/* Generated by Cython 0.14.1 on Wed Feb 29 17:05:34 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.
#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 < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
#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)   PyInt_AsLong(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)

#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#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_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_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#if (PY_MAJOR_VERSION < 3) || (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

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

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE_API__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 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)
#   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_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))


#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",
};

typedef npy_int8 __pyx_t_5numpy_int8_t;

typedef npy_int16 __pyx_t_5numpy_int16_t;

typedef npy_int32 __pyx_t_5numpy_int32_t;

typedef npy_int64 __pyx_t_5numpy_int64_t;

typedef npy_uint8 __pyx_t_5numpy_uint8_t;

typedef npy_uint16 __pyx_t_5numpy_uint16_t;

typedef npy_uint32 __pyx_t_5numpy_uint32_t;

typedef npy_uint64 __pyx_t_5numpy_uint64_t;

typedef npy_float32 __pyx_t_5numpy_float32_t;

typedef npy_float64 __pyx_t_5numpy_float64_t;

typedef npy_long __pyx_t_5numpy_int_t;

typedef npy_longlong __pyx_t_5numpy_long_t;

typedef npy_intp __pyx_t_5numpy_intp_t;

typedef npy_uintp __pyx_t_5numpy_uintp_t;

typedef npy_ulong __pyx_t_5numpy_uint_t;

typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

typedef npy_double __pyx_t_5numpy_float_t;

typedef npy_double __pyx_t_5numpy_double_t;

typedef npy_longdouble __pyx_t_5numpy_longdouble_t;

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 */

typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

typedef npy_cdouble __pyx_t_5numpy_complex_t;

typedef __pyx_t_5numpy_double_t (*__pyx_t_6pandas_8_tseries_skiplist_f)(PyObject *, int, int);

/* "/Users/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;
};

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":582
 * 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;
};

/* "/Users/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;
};

/* "/Users/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;
};

/* "/Users/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;
};

/* "/Users/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
};

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":895
 *         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;
};

/* "/Users/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;
};

/* "/Users/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;
};

/* "/Users/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;
};

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":860
 *     #             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;
};

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":926
 *         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;
};

/* "/Users/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;
};

/* "/Users/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;
};

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":693
 *         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;
};

/* "/Users/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;
};

/* "/Users/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;
};

/* "/Users/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;
};


/* "/Users/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;


/* "/Users/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;


/* "/Users/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 {
  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;


/* "/Users/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;


/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":582
 * 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;


/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":693
 *         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;


/* "/Users/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;


/* "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) {
    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;
  }
  #define __Pyx_RefNannySetupContext(name)           void *__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_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
#else
  #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_XDECREF(r) Py_XDECREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)

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


static 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) {
    PyObject *r;
    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
        r = PySequence_GetItem(o, i);
    }
    else {
        r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
    }
    return r;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*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 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 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); /*proto*/

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

/* Run-time type information about structs used with buffers */
struct __Pyx_StructField_;

typedef struct {
  const char* name; /* for error messages only */
  struct __Pyx_StructField_* fields;
  size_t size;     /* sizeof(type) */
  char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject */
} __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;


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 long __Pyx_NegateNonNeg(long 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 PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
static int __Pyx_EndUnpack(PyObject *, 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) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        Py_INCREF(v);
        Py_DECREF(PyList_GET_ITEM(o, i));
        PyList_SET_ITEM(o, i, v);
        return 1;
    }
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
        return PySequence_SetItem(o, i, v);
    else {
        PyObject *j = PyInt_FromSsize_t(i);
        return __Pyx_SetItemInt_Generic(o, j, v);
    }
}

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 int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*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_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*/
#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};
Py_ssize_t __Pyx_minusones[] = {-1, -1};

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

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

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

#define __pyx_binding_PyCFunctionType_USED 1

typedef struct {
    PyCFunctionObject func;
} __pyx_binding_PyCFunctionType_object;

static PyTypeObject __pyx_binding_PyCFunctionType_type;
static PyTypeObject *__pyx_binding_PyCFunctionType = NULL;

static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */
#define __pyx_binding_PyCFunctionType_New(ml, self) __pyx_binding_PyCFunctionType_NewEx(ml, self, NULL)

static int __pyx_binding_PyCFunctionType_init(void); /* 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 *);

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

static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject *);

#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); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long 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); /*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 PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*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.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_set_value_at(PyArrayObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *); /*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 CYTHON_INLINE int __pyx_f_6pandas_8_tseries_int_max(int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_int_min(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 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), 'U' };
static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), 'O' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), 'I' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), 'R' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), 'I' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), 'I' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_double_t = { "double_t", NULL, sizeof(__pyx_t_5numpy_double_t), 'R' };
static __Pyx_TypeInfo __Pyx_TypeInfo_Py_ssize_t = { "Py_ssize_t", NULL, sizeof(Py_ssize_t), 'I' };
#define __Pyx_MODULE_NAME "pandas._tseries"
static 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 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_77[] = "pandas.core.index";
static char __pyx_k_78[] = "Index length did not match values";
static char __pyx_k_80[] = "list_to_object_array";
static char __pyx_k_82[] = "mixed-integer";
static char __pyx_k_83[] = ".";
static char __pyx_k_84[] = "%m/%d/%Y";
static char __pyx_k_85[] = "pandas._tseries";
static char __pyx_k_86[] = "";
static char __pyx_k_94[] = "ndarray is not C contiguous";
static char __pyx_k_96[] = "ndarray is not Fortran contiguous";
static char __pyx_k_98[] = "Non-native byte order not supported";
static char __pyx_k__B[] = "B";
static char __pyx_k__C[] = "C";
static char __pyx_k__F[] = "F";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";
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__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__k[] = "k";
static char __pyx_k__l[] = "l";
static char __pyx_k__q[] = "q";
static char __pyx_k_100[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_101[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_104[] = "Format string allocated too short.";
static char __pyx_k_106[] = "index out of bounds";
static char __pyx_k_109[] = "fast_unique_multiple";
static char __pyx_k_110[] = "fast_unique_multiple_list";
static char __pyx_k_111[] = "fast_unique_multiple_list_gen";
static char __pyx_k_112[] = "func_groupby_indices";
static char __pyx_k_113[] = "get_backfill_indexer";
static char __pyx_k_114[] = "backfill_inplace_float64";
static char __pyx_k_115[] = "take_join_contiguous";
static char __pyx_k_116[] = "merge_indexer_float64";
static char __pyx_k_117[] = "merge_indexer_object";
static char __pyx_k_118[] = "pad_2d_inplace_float64";
static char __pyx_k_119[] = "pad_2d_inplace_object";
static char __pyx_k_120[] = "pad_2d_inplace_int32";
static char __pyx_k_121[] = "pad_2d_inplace_int64";
static char __pyx_k_122[] = "backfill_2d_inplace_float64";
static char __pyx_k_123[] = "backfill_2d_inplace_object";
static char __pyx_k_124[] = "backfill_2d_inplace_int32";
static char __pyx_k_125[] = "backfill_2d_inplace_int64";
static char __pyx_k_126[] = "backfill_2d_inplace_bool";
static char __pyx_k_127[] = "is_monotonic_float64";
static char __pyx_k_128[] = "take_2d_axis0_float64";
static char __pyx_k_129[] = "take_2d_axis0_object";
static char __pyx_k_130[] = "take_2d_axis1_float64";
static char __pyx_k_131[] = "take_2d_axis1_object";
static char __pyx_k_132[] = "left_join_indexer_float64";
static char __pyx_k_133[] = "left_join_indexer_object";
static char __pyx_k_134[] = "left_join_indexer_int32";
static char __pyx_k_135[] = "left_join_indexer_int64";
static char __pyx_k_136[] = "outer_join_indexer_float64";
static char __pyx_k_137[] = "outer_join_indexer_object";
static char __pyx_k_138[] = "outer_join_indexer_int32";
static char __pyx_k_139[] = "outer_join_indexer_int64";
static char __pyx_k_140[] = "inner_join_indexer_float64";
static char __pyx_k_141[] = "inner_join_indexer_object";
static char __pyx_k_142[] = "inner_join_indexer_int32";
static char __pyx_k_143[] = "inner_join_indexer_int64";
static char __pyx_k_144[] = "maybe_convert_numeric";
static char __pyx_k_145[] = "tuples_to_object_array";
static char __pyx_k_146[] = "to_object_array_tuples";
static char __pyx_k__Zd[] = "Zd";
static char __pyx_k__Zf[] = "Zf";
static char __pyx_k__Zg[] = "Zg";
static char __pyx_k__eq[] = "eq";
static char __pyx_k__f8[] = "f8";
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__le[] = "le";
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__NIL[] = "NIL";
static char __pyx_k__NaN[] = "NaN";
static char __pyx_k__arg[] = "arg";
static char __pyx_k__arr[] = "arr";
static char __pyx_k__buf[] = "buf";
static char __pyx_k__com[] = "com";
static char __pyx_k__get[] = "get";
static char __pyx_k__inf[] = "inf";
static char __pyx_k__key[] = "key";
static char __pyx_k__nan[] = "nan";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__out[] = "out";
static char __pyx_k__put[] = "put";
static char __pyx_k__val[] = "val";
static char __pyx_k__win[] = "win";
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__base[] = "base";
static char __pyx_k__copy[] = "copy";
static char __pyx_k__data[] = "data";
static char __pyx_k__date[] = "date";
static char __pyx_k__ewma[] = "ewma";
static char __pyx_k__fget[] = "fget";
static char __pyx_k__fill[] = "fill";
static char __pyx_k__func[] = "func";
static char __pyx_k__head[] = "head";
static char __pyx_k__int8[] = "int8";
static char __pyx_k__int_[] = "int_";
static char __pyx_k__item[] = "item";
static char __pyx_k__keys[] = "keys";
static char __pyx_k__left[] = "left";
static char __pyx_k__mask[] = "mask";
static char __pyx_k__minp[] = "minp";
static char __pyx_k__name[] = "name";
static char __pyx_k__ndim[] = "ndim";
static char __pyx_k__next[] = "next";
static char __pyx_k__ones[] = "ones";
static char __pyx_k__safe[] = "safe";
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__take[] = "take";
static char __pyx_k__test[] = "test";
static char __pyx_k__time[] = "time";
static char __pyx_k__type[] = "type";
static char __pyx_k__vals[] = "vals";
static char __pyx_k__view[] = "view";
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__count[] = "count";
static char __pyx_k__depth[] = "depth";
static char __pyx_k__descr[] = "descr";
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__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__mixed[] = "mixed";
static char __pyx_k__names[] = "names";
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__retry[] = "retry";
static char __pyx_k__right[] = "right";
static char __pyx_k__shape[] = "shape";
static char __pyx_k__store[] = "store";
static char __pyx_k__table[] = "table";
static char __pyx_k__uint8[] = "uint8";
static char __pyx_k__value[] = "value";
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__append[] = "append";
static char __pyx_k__arange[] = "arange";
static char __pyx_k__arrmap[] = "arrmap";
static char __pyx_k__astype[] = "astype";
static char __pyx_k__counts[] = "counts";
static char __pyx_k__fields[] = "fields";
static char __pyx_k__format[] = "format";
static char __pyx_k__in_arr[] = "in_arr";
static char __pyx_k__insert[] = "insert";
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__newMap[] = "newMap";
static char __pyx_k__object[] = "object";
static char __pyx_k__oldMap[] = "oldMap";
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__series[] = "series";
static char __pyx_k__sorter[] = "sorter";
static char __pyx_k__stride[] = "stride";
static char __pyx_k__string[] = "string";
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__advance[] = "advance";
static char __pyx_k__aggfunc[] = "aggfunc";
static char __pyx_k__argsort[] = "argsort";
static char __pyx_k__asarray[] = "asarray";
static char __pyx_k__boolean[] = "boolean";
static char __pyx_k__buckets[] = "buckets";
static char __pyx_k__cleanup[] = "cleanup";
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__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__ngroups[] = "ngroups";
static char __pyx_k__nonzero[] = "nonzero";
static char __pyx_k__object_[] = "object_";
static char __pyx_k__objects[] = "objects";
static char __pyx_k__putmask[] = "putmask";
static char __pyx_k__rvalues[] = "rvalues";
static char __pyx_k__strides[] = "strides";
static char __pyx_k__string_[] = "string_";
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__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__lindexer[] = "lindexer";
static char __pyx_k__newIndex[] = "newIndex";
static char __pyx_k__nresults[] = "nresults";
static char __pyx_k__oldIndex[] = "oldIndex";
static char __pyx_k__operator[] = "operator";
static char __pyx_k__orig_len[] = "orig_len";
static char __pyx_k__pad_bool[] = "pad_bool";
static char __pyx_k__quantile[] = "quantile";
static char __pyx_k__readonly[] = "readonly";
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__set_item[] = "set_item";
static char __pyx_k__strptime[] = "strptime";
static char __pyx_k__test_str[] = "test_str";
static char __pyx_k__type_num[] = "type_num";
static char __pyx_k__unicode_[] = "unicode_";
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__byteorder[] = "byteorder";
static char __pyx_k__chunksize[] = "chunksize";
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__increment[] = "increment";
static char __pyx_k__isnullobj[] = "isnullobj";
static char __pyx_k__map_infer[] = "map_infer";
static char __pyx_k__maxlevels[] = "maxlevels";
static char __pyx_k__n_buckets[] = "n_buckets";
static char __pyx_k__na_values[] = "na_values";
static char __pyx_k__orig_data[] = "orig_data";
static char __pyx_k__pad_int32[] = "pad_int32";
static char __pyx_k__pad_int64[] = "pad_int64";
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__size_hint[] = "size_hint";
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__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__inner_join[] = "inner_join";
static char __pyx_k__is_integer[] = "is_integer";
static char __pyx_k__iterations[] = "iterations";
static char __pyx_k__max_groups[] = "max_groups";
static char __pyx_k__obj_unique[] = "obj_unique";
static char __pyx_k__pad_object[] = "pad_object";
static char __pyx_k__pydatetime[] = "pydatetime";
static char __pyx_k__set_length[] = "set_length";
static char __pyx_k__suboffsets[] = "suboffsets";
static char __pyx_k__zeros_like[] = "zeros_like";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k___check_minp[] = "_check_minp";
static char __pyx_k___check_type[] = "_check_type";
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__na_sentinel[] = "na_sentinel";
static char __pyx_k__pad_float64[] = "pad_float64";
static char __pyx_k__reduce_mean[] = "reduce_mean";
static char __pyx_k__return_true[] = "return_true";
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__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_join_1d[] = "left_join_1d";
static char __pyx_k__left_join_2d[] = "left_join_2d";
static char __pyx_k__passed_dummy[] = "passed_dummy";
static char __pyx_k__return_false[] = "return_false";
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__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__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__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__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_kp_u_100;
static PyObject *__pyx_kp_u_101;
static PyObject *__pyx_kp_u_104;
static PyObject *__pyx_kp_s_106;
static PyObject *__pyx_n_s_109;
static PyObject *__pyx_n_s_110;
static PyObject *__pyx_n_s_111;
static PyObject *__pyx_n_s_112;
static PyObject *__pyx_n_s_113;
static PyObject *__pyx_n_s_114;
static PyObject *__pyx_n_s_115;
static PyObject *__pyx_n_s_116;
static PyObject *__pyx_n_s_117;
static PyObject *__pyx_n_s_118;
static PyObject *__pyx_n_s_119;
static PyObject *__pyx_n_s_120;
static PyObject *__pyx_n_s_121;
static PyObject *__pyx_n_s_122;
static PyObject *__pyx_n_s_123;
static PyObject *__pyx_n_s_124;
static PyObject *__pyx_n_s_125;
static PyObject *__pyx_n_s_126;
static PyObject *__pyx_n_s_127;
static PyObject *__pyx_n_s_128;
static PyObject *__pyx_n_s_129;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_n_s_130;
static PyObject *__pyx_n_s_131;
static PyObject *__pyx_n_s_132;
static PyObject *__pyx_n_s_133;
static PyObject *__pyx_n_s_134;
static PyObject *__pyx_n_s_135;
static PyObject *__pyx_n_s_136;
static PyObject *__pyx_n_s_137;
static PyObject *__pyx_n_s_138;
static PyObject *__pyx_n_s_139;
static PyObject *__pyx_n_s_140;
static PyObject *__pyx_n_s_141;
static PyObject *__pyx_n_s_142;
static PyObject *__pyx_n_s_143;
static PyObject *__pyx_n_s_144;
static PyObject *__pyx_n_s_145;
static PyObject *__pyx_n_s_146;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_3;
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_77;
static PyObject *__pyx_kp_s_78;
static PyObject *__pyx_n_s_8;
static PyObject *__pyx_n_s_80;
static PyObject *__pyx_kp_s_82;
static PyObject *__pyx_kp_s_83;
static PyObject *__pyx_kp_s_84;
static PyObject *__pyx_n_s_85;
static PyObject *__pyx_kp_s_86;
static PyObject *__pyx_kp_u_94;
static PyObject *__pyx_kp_u_96;
static PyObject *__pyx_kp_u_98;
static PyObject *__pyx_n_s__AssertionError;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_s__C;
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__KeyError;
static PyObject *__pyx_n_s__N;
static PyObject *__pyx_n_s__NIL;
static PyObject *__pyx_n_s__NaN;
static PyObject *__pyx_n_s__O;
static PyObject *__pyx_n_s__ONAN;
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___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___check_type;
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___set_axis;
static PyObject *__pyx_n_s__a;
static PyObject *__pyx_n_s__advance;
static PyObject *__pyx_n_s__aggfunc;
static PyObject *__pyx_n_s__append;
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__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__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__astype;
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__base;
static PyObject *__pyx_n_s__bool_;
static PyObject *__pyx_n_s__boolean;
static PyObject *__pyx_n_s__buckets;
static PyObject *__pyx_n_s__buf;
static PyObject *__pyx_n_s__byteorder;
static PyObject *__pyx_n_s__c_contiguous;
static PyObject *__pyx_n_s__chunksize;
static PyObject *__pyx_n_s__cleanup;
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__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__depth;
static PyObject *__pyx_n_s__descr;
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__dtype;
static PyObject *__pyx_n_s__dummy;
static PyObject *__pyx_n_s__duplicated;
static PyObject *__pyx_n_s__empty;
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__fget;
static PyObject *__pyx_n_s__fields;
static PyObject *__pyx_n_s__fill;
static PyObject *__pyx_n_s__fill_value;
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__format;
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__ge;
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_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__head;
static PyObject *__pyx_n_s__i4;
static PyObject *__pyx_n_s__i8;
static PyObject *__pyx_n_s__idMap;
static PyObject *__pyx_n_s__in_arr;
static PyObject *__pyx_n_s__inclusive;
static PyObject *__pyx_n_s__increment;
static PyObject *__pyx_n_s__index;
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__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__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__item;
static PyObject *__pyx_n_s__itemsize;
static PyObject *__pyx_n_s__iterations;
static PyObject *__pyx_n_s__join_sorter;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__key;
static PyObject *__pyx_n_s__keys;
static PyObject *__pyx_n_s__kth_smallest;
static PyObject *__pyx_n_s__label_arrays;
static PyObject *__pyx_n_s__labels;
static PyObject *__pyx_n_s__le;
static PyObject *__pyx_n_s__left;
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__length;
static PyObject *__pyx_n_s__lindexer;
static PyObject *__pyx_n_s__lookup2;
static PyObject *__pyx_n_s__lookup_values;
static PyObject *__pyx_n_s__lt;
static PyObject *__pyx_n_s__lvalues;
static PyObject *__pyx_n_s__map_infer;
static PyObject *__pyx_n_s__mapper;
static PyObject *__pyx_n_s__mapping;
static PyObject *__pyx_n_s__mask;
static PyObject *__pyx_n_s__max_bin;
static PyObject *__pyx_n_s__max_groups;
static PyObject *__pyx_n_s__maxlevels;
static PyObject *__pyx_n_s__maybe_convert_bool;
static PyObject *__pyx_n_s__median;
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__minp;
static PyObject *__pyx_n_s__mixed;
static PyObject *__pyx_n_s__n_buckets;
static PyObject *__pyx_n_s__na_sentinel;
static PyObject *__pyx_n_s__na_values;
static PyObject *__pyx_n_s__name;
static PyObject *__pyx_n_s__names;
static PyObject *__pyx_n_s__nan;
static PyObject *__pyx_n_s__ndim;
static PyObject *__pyx_n_s__ne;
static PyObject *__pyx_n_s__newIndex;
static PyObject *__pyx_n_s__newMap;
static PyObject *__pyx_n_s__next;
static PyObject *__pyx_n_s__ngroups;
static PyObject *__pyx_n_s__nonzero;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_s__nresults;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__obj_unique;
static PyObject *__pyx_n_s__object;
static PyObject *__pyx_n_s__object_;
static PyObject *__pyx_n_s__objects;
static PyObject *__pyx_n_s__oldIndex;
static PyObject *__pyx_n_s__oldMap;
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__orig_data;
static PyObject *__pyx_n_s__orig_len;
static PyObject *__pyx_n_s__other;
static PyObject *__pyx_n_s__out;
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__parser;
static PyObject *__pyx_n_s__passed_dummy;
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_2d_float64;
static PyObject *__pyx_n_s__rank_2d_generic;
static PyObject *__pyx_n_s__readonly;
static PyObject *__pyx_n_s__reduce;
static PyObject *__pyx_n_s__reduce_mean;
static PyObject *__pyx_n_s__remove;
static PyObject *__pyx_n_s__retry;
static PyObject *__pyx_n_s__return_false;
static PyObject *__pyx_n_s__return_true;
static PyObject *__pyx_n_s__right;
static PyObject *__pyx_n_s__rindexer;
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__rvalues;
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__self;
static PyObject *__pyx_n_s__series;
static PyObject *__pyx_n_s__set_item;
static PyObject *__pyx_n_s__set_length;
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__sort;
static PyObject *__pyx_n_s__sorter;
static PyObject *__pyx_n_s__store;
static PyObject *__pyx_n_s__stride;
static PyObject *__pyx_n_s__strides;
static PyObject *__pyx_n_s__string;
static PyObject *__pyx_n_s__string_;
static PyObject *__pyx_n_s__strptime;
static PyObject *__pyx_n_s__suboffsets;
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__time;
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__type;
static PyObject *__pyx_n_s__type_num;
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__vals;
static PyObject *__pyx_n_s__value;
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__view;
static PyObject *__pyx_n_s__width;
static PyObject *__pyx_n_s__win;
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_87;
static PyObject *__pyx_k_90;
static PyObject *__pyx_k_91;
static PyObject *__pyx_k_92;
static PyObject *__pyx_k_93;
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_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_69;
static PyObject *__pyx_k_tuple_70;
static PyObject *__pyx_k_tuple_71;
static PyObject *__pyx_k_tuple_72;
static PyObject *__pyx_k_tuple_73;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_75;
static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_79;
static PyObject *__pyx_k_tuple_81;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_89;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_97;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_102;
static PyObject *__pyx_k_tuple_103;
static PyObject *__pyx_k_tuple_105;
static PyObject *__pyx_k_tuple_107;
static PyObject *__pyx_k_tuple_108;

/* "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;
  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;
  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_pf_6pandas_8_tseries_map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_map_indices_list(PyObject *__pyx_v_index, 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;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __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:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __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(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_pf_6pandas_8_tseries_map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("map_indices_list");
  __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_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_map_indices_list(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.map_indices_list");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_8MultiMap___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label_arrays = 0;
  __pyx_t_5numpy_int32_t **__pyx_v_ptr;
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__label_arrays,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_label_arrays = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_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;}

  /* "pandas/src/tseries.pyx":99
 *             Py_ssize_t i
 * 
 *         self.depth = len(label_arrays)             # <<<<<<<<<<<<<<
 *         self.length = len(label_arrays[0])
 *         self.store = {}
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_label_arrays);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  ((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self)->depth = __pyx_t_2;

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

  /* "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_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self)->store);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self)->store));
  ((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self)->store = __pyx_t_1;
  __pyx_t_1 = 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((((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__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_2 = ((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self)->depth;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __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_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_label_arrays), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    (__pyx_v_ptr[__pyx_v_i]) = ((__pyx_t_5numpy_int32_t *)((PyArrayObject *)__pyx_t_1)->data);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_1);
  __Pyx_AddTraceback("pandas._tseries.MultiMap.__init__");
  __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, __pyx_t_5numpy_int32_t **__pyx_v_ptr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  PyObject *__pyx_r = NULL;
  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_pf_6pandas_8_tseries_8MultiMap_1get(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;
  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;
  __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_pf_6pandas_8_tseries_8MultiMap_1get)) {
      __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(((PyObject *)__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(((PyObject *)__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);
  __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_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_level);
  __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_pf_6pandas_8_tseries_8MultiMap_1get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_8MultiMap_1get(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get");
  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_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_key);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_MultiMap *)((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self)->__pyx_vtab)->get(((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self), ((PyObject*)__pyx_t_1), 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_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.MultiMap.get");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_1ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_1ismember[] = "\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_1ismember = {__Pyx_NAMESTR("ismember"), (PyCFunction)__pyx_pf_6pandas_8_tseries_1ismember, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_1ismember)};
static PyObject *__pyx_pf_6pandas_8_tseries_1ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_values = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayIterObject *__pyx_v_it;
  PyArrayObject *__pyx_v_result;
  PyObject *__pyx_v_val;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__values,0};
  __Pyx_RefNannySetupContext("ismember");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_values = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_it = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  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;}

  /* "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 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyArray_IterNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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":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 *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_3;

  /* "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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __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 = 154; __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 = 154; __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 = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 154; __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 = 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_2, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); 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_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_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_bstruct_result);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __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_3 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_3; __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 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_6), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 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_bshape_0_result;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_14, __pyx_bstride_0_result) = 1;
      goto __pyx_L8;
    }
    /*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_bshape_0_result;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_15, __pyx_bstride_0_result) = 0;
    }
    __pyx_L8:;

    /* "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_2 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_4 = PyObject_GetAttr(__pyx_t_6, __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_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_2, ((PyObject *)__pyx_t_6), 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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 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_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_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ismember");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_it);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __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(((PyObject *)__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_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_pf_6pandas_8_tseries_2to_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, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __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(((PyObject *)__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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_2to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_2to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp) {
  __pyx_t_5numpy_int64_t __pyx_v_timestamp;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("to_datetime");
  __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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __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_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_pf_6pandas_8_tseries_3to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_to_timestamp(PyObject *__pyx_v_dt, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __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_v_dt;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_8_tseries_gmtime(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.to_timestamp");
  __pyx_r = 0;
  __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_pf_6pandas_8_tseries_3to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_3to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("to_timestamp");
  __pyx_self = __pyx_self;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_dt;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_to_timestamp(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.to_timestamp");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_4array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_4array_to_timestamp = {__Pyx_NAMESTR("array_to_timestamp"), (PyCFunction)__pyx_pf_6pandas_8_tseries_4array_to_timestamp, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_4array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  __Pyx_RefNannySetupContext("array_to_timestamp");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.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 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":196
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     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[2]; __pyx_lineno = 196; __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 = 196; __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_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __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 = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 196; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __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_bshape_0_arr;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_arr)) __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_bstruct_arr.buf, __pyx_t_12, __pyx_bstride_0_arr);
    __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_bshape_0_result;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_13, __pyx_bstride_0_result) = __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_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_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.array_to_timestamp");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __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_5array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_5array_to_datetime = {__Pyx_NAMESTR("array_to_datetime"), (PyCFunction)__pyx_pf_6pandas_8_tseries_5array_to_datetime, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_5array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject **__pyx_t_14;
  __Pyx_RefNannySetupContext("array_to_datetime");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.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 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":208
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     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[2]; __pyx_lineno = 208; __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 = 208; __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_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __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 = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 208; __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 = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_result);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __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_bshape_0_arr;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_arr)) __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_bstruct_arr.buf, __pyx_t_11, __pyx_bstride_0_arr)), 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_bshape_0_result;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_12, __pyx_bstride_0_result);
    __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_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_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.array_to_datetime");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __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_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!PyArray_Check(__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __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[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = (__pyx_v_val == Py_None);
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); 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_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_3) {
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_1;
      __pyx_t_1 = 0;
    }
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pandas._tseries._checknull");
  __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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __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_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!PyArray_Check(__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __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[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); 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_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __pyx_t_4 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 == (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_3;
  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_4);
  __Pyx_WriteUnraisable("pandas._tseries._checknan");
  __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_pf_6pandas_8_tseries_6checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_checknull(PyObject *__pyx_v_val, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __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 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = is_float_object(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "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_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __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 = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_2) {
        __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_1;
      __pyx_t_1 = 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_v_val;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_f_4util_is_array(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 231; __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*/ {

    /* "pandas/src/tseries.pyx":233
 *         return False
 *     else:
 *         return _checknull(val)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_v_val;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_f_6pandas_8_tseries__checknull(__pyx_t_1)); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __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_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.checknull");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_6checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_6checknull(PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("checknull");
  __pyx_self = __pyx_self;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_checknull(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.checknull");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_7isnullobj = {__Pyx_NAMESTR("isnullobj"), (PyCFunction)__pyx_pf_6pandas_8_tseries_7isnullobj, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_7isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_13;
  __Pyx_RefNannySetupContext("isnullobj");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.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 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __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 = 243; __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 = 243; __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 = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 243; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __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_bstruct_arr.buf, __pyx_t_12, __pyx_bstride_0_arr);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_13 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_result.buf, __pyx_t_13, __pyx_bstride_0_result) = __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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 246; __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 = 246; __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 = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 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_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_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.isnullobj");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __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_8isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_8isnullobj2d = {__Pyx_NAMESTR("isnullobj2d"), (PyCFunction)__pyx_pf_6pandas_8_tseries_8isnullobj2d, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_8isnullobj2d(PyObject *__pyx_self, PyObject *__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;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bstride_1_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_ssize_t __pyx_bshape_1_arr = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bstride_1_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_ssize_t __pyx_bshape_1_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  __Pyx_RefNannySetupContext("isnullobj2d");
  __pyx_self = __pyx_self;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0]; __pyx_bstride_1_arr = __pyx_bstruct_arr.strides[1];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0]; __pyx_bshape_1_arr = __pyx_bstruct_arr.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(__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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_n = __pyx_t_4;
    __pyx_v_m = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_n = __pyx_t_5;
    __pyx_v_m = __pyx_t_4;
  }

  /* "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_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 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(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 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[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_bstruct_result, (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_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_bstride_0_result = __pyx_bstruct_result.strides[0]; __pyx_bstride_1_result = __pyx_bstruct_result.strides[1];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0]; __pyx_bshape_1_result = __pyx_bstruct_result.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 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_4 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __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_5 = __pyx_v_m;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __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_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_7 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_arr.buf, __pyx_t_13, __pyx_bstride_0_arr, __pyx_t_14, __pyx_bstride_1_arr);
      __Pyx_INCREF((PyObject*)__pyx_t_7);
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_7;
      __pyx_t_7 = 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_7 = __pyx_f_6pandas_8_tseries_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_15) {

        /* "pandas/src/tseries.pyx":261
 *             val = arr[i, j]
 *             if checknull(val):
 *                 result[i, j] = 1             # <<<<<<<<<<<<<<
 *     return result.view(np.bool_)
 * 
 */
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_17 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_result.buf, __pyx_t_16, __pyx_bstride_0_result, __pyx_t_17, __pyx_bstride_1_result) = 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_7 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __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[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __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_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), 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_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.isnullobj2d");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __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_9list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_6pandas_8_tseries_9list_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_9list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_9list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_9list_to_object_array)};
static PyObject *__pyx_pf_6pandas_8_tseries_9list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_arr;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  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;
  PyObject **__pyx_t_12;
  __Pyx_RefNannySetupContext("list_to_object_array");
  __pyx_self = __pyx_self;
  __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_arr.buf = NULL;
  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;}

  /* "pandas/src/tseries.pyx":273
 *         ndarray[object] arr
 * 
 *     n = len(obj)             # <<<<<<<<<<<<<<
 *     arr = np.empty(n, dtype=object)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_obj);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":274
 * 
 *     n = len(obj)
 *     arr = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     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[2]; __pyx_lineno = 274; __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 = 274; __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 = 274; __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 = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 274; __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 = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_arr);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
    __pyx_bshape_0_arr = __pyx_bstruct_arr.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_DECREF(((PyObject *)__pyx_v_arr));
  __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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __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_bshape_0_arr;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_arr)) __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_bstruct_arr.buf, __pyx_t_11, __pyx_bstride_0_arr);
    __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_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_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.list_to_object_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __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_10fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_10fast_unique = {__Pyx_NAMESTR("fast_unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_10fast_unique, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_10fast_unique(PyObject *__pyx_self, PyObject *__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;
  PyObject *__pyx_v_stub = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("fast_unique");
  __pyx_self = __pyx_self;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":287
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         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 = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":288
 *         Py_ssize_t i, n = len(values)
 *         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 = 288; __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":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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_3, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 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)
 */
    if (unlikely(__pyx_v_table == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __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()
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __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_L7;
    }
    __pyx_L7:;
  }

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

      /* "pandas/src/tseries.pyx":297
 *             uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'sort'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L8_error;} 
      }
      __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_L8_error;}
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/src/tseries.pyx":298
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_5) {
      PyErr_Restore(0,0,0);
      goto __pyx_L9_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L15_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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __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_11fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_11fast_unique_multiple = {__Pyx_NAMESTR("fast_unique_multiple"), (PyCFunction)__pyx_pf_6pandas_8_tseries_11fast_unique_multiple, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_11fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays) {
  PyArrayObject *__pyx_v_buf;
  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;
  PyObject *__pyx_v_stub = 0;
  Py_buffer __pyx_bstruct_buf;
  Py_ssize_t __pyx_bstride_0_buf = 0;
  Py_ssize_t __pyx_bshape_0_buf = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("fast_unique_multiple");
  __pyx_self = __pyx_self;
  __pyx_v_buf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_buf.buf = NULL;
  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;}

  /* "pandas/src/tseries.pyx":308
 *     cdef:
 *         ndarray[object] buf
 *         Py_ssize_t k = len(arrays)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i, j, n
 *         list uniques = []
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_arrays);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":311
 *         Py_ssize_t i, 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 = 311; __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":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_2 = __pyx_v_k;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __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:
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_arrays), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_buf);
      __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_buf, (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_bstruct_buf, (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_bstride_0_buf = __pyx_bstruct_buf.strides[0];
      __pyx_bshape_0_buf = __pyx_bstruct_buf.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_DECREF(((PyObject *)__pyx_v_buf));
    __pyx_v_buf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_buf.buf, __pyx_t_9, __pyx_bstride_0_buf);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_1;
      __pyx_t_1 = 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)
 */
      if (unlikely(__pyx_v_table == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __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()
 */
        if (unlikely(__pyx_v_uniques == Py_None)) {
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
        }
        __pyx_t_4 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
  }

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

      /* "pandas/src/tseries.pyx":323
 *                 uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'sort'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L10_error;} 
      }
      __pyx_t_4 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L17_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_L11_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L17_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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_buf);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_unique_multiple");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_buf);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __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_12fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_12fast_unique_multiple_list = {__Pyx_NAMESTR("fast_unique_multiple_list"), (PyCFunction)__pyx_pf_6pandas_8_tseries_12fast_unique_multiple_list, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_12fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists) {
  PyObject *__pyx_v_buf;
  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;
  PyObject *__pyx_v_stub = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("fast_unique_multiple_list");
  __pyx_self = __pyx_self;
  __pyx_v_buf = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  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;}

  /* "pandas/src/tseries.pyx":334
 *     cdef:
 *         list buf
 *         Py_ssize_t k = len(lists)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i, j, n
 *         list uniques = []
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_lists);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":337
 *         Py_ssize_t i, 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 = 337; __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":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_2 = __pyx_v_k;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __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:
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_lists), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; __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[2]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_buf));
    __pyx_v_buf = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "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(__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_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_buf), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "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)
 */
      if (unlikely(__pyx_v_table == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __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()
 */
        if (unlikely(__pyx_v_uniques == Py_None)) {
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
        }
        __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_L9;
      }
      __pyx_L9:;
    }
  }

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

      /* "pandas/src/tseries.pyx":349
 *                 uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'sort'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L10_error;} 
      }
      __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_L10_error;}
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L17_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/src/tseries.pyx":350
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_5) {
      PyErr_Restore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L17_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_1);
  __Pyx_AddTraceback("pandas._tseries.fast_unique_multiple_list");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __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_13fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_13fast_unique_multiple_list_gen = {__Pyx_NAMESTR("fast_unique_multiple_list_gen"), (PyCFunction)__pyx_pf_6pandas_8_tseries_13fast_unique_multiple_list_gen, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_13fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen) {
  PyObject *__pyx_v_buf;
  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;
  PyObject *__pyx_v_stub = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen");
  __pyx_self = __pyx_self;
  __pyx_v_buf = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);

  /* "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(((PyObject *)__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_2 = 0; __pyx_t_1 = __pyx_v_gen; __Pyx_INCREF(__pyx_t_1);
  } 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);
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_1))) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
      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++;
    } else {
      __pyx_t_3 = PyIter_Next(__pyx_t_1);
      if (!__pyx_t_3) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_buf));
    __pyx_v_buf = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/src/tseries.pyx":366
 * 
 *     for buf in gen:
 *         n = len(buf)             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < n:
 *             val = buf[j]
 */
    if (unlikely(__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_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_buf)); 
    __pyx_v_n = __pyx_t_4;

    /* "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_4 = __pyx_v_n;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __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_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_buf), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "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)
 */
      if (unlikely(__pyx_v_table == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_5 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_table), __pyx_v_val))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_5) {

        /* "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:
 */
        if (unlikely(__pyx_v_uniques == Py_None)) {
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
        }
        __pyx_t_6 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":373
 *                 uniques.append(val)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         uniques.sort()
 *     except Exception:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "pandas/src/tseries.pyx":374
 * 
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'sort'"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L10_error;} 
      }
      __pyx_t_6 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L17_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/src/tseries.pyx":375
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_6) {
      PyErr_Restore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L17_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_3);
  __Pyx_AddTraceback("pandas._tseries.fast_unique_multiple_list_gen");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __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_14dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_14dicts_to_array = {__Pyx_NAMESTR("dicts_to_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14dicts_to_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_14dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dicts = 0;
  PyObject *__pyx_v_columns = 0;
  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;
  PyObject *__pyx_v_row;
  PyObject *__pyx_v_col;
  PyObject *__pyx_v_onan = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bstride_1_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_ssize_t __pyx_bshape_1_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dicts,&__pyx_n_s__columns,0};
  __Pyx_RefNannySetupContext("dicts_to_array");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_dicts = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_columns = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_row = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_col = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  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;}

  /* "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)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_columns);
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(__pyx_t_2 == 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(__pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_3;

  /* "pandas/src/tseries.pyx":390
 * 
 *     k = len(columns)
 *     n = len(dicts)             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype='O')
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_dicts);
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(__pyx_t_2 == 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(__pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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(((PyObject *)__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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0]; __pyx_bstride_1_result = __pyx_bstruct_result.strides[1];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0]; __pyx_bshape_1_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __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]
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_dicts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_row));
    __pyx_v_row = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "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_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_columns), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_col);
      __pyx_v_col = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "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(__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_bstruct_result.buf, __pyx_t_15, __pyx_bstride_0_result, __pyx_t_16, __pyx_bstride_1_result);
        __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_L10;
      }
      /*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_bstruct_result.buf, __pyx_t_18, __pyx_bstride_0_result, __pyx_t_19, __pyx_bstride_1_result);
        __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_L10:;
    }
  }

  /* "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_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.dicts_to_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__pyx_v_row);
  __Pyx_DECREF(__pyx_v_col);
  __Pyx_XDECREF(__pyx_v_onan);
  __Pyx_XGIVEREF(__pyx_r);
  __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_15fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /*proto*/
static char __pyx_doc_6pandas_8_tseries_15fast_zip[] = "\n    For zipping multiple ndarrays into an ndarray of tuples\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_15fast_zip = {__Pyx_NAMESTR("fast_zip"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15fast_zip, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_15fast_zip)};
static PyObject *__pyx_pf_6pandas_8_tseries_15fast_zip(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;
  PyArrayIterObject *__pyx_v_it;
  PyObject *__pyx_v_val;
  PyObject *__pyx_v_tup;
  PyObject *__pyx_v_arr;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("fast_zip");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_it = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_tup = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_arr = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  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;}

  /* "pandas/src/tseries.pyx":416
 *         object val, tup
 * 
 *     k = len(ndarrays)             # <<<<<<<<<<<<<<
 *     n = len(ndarrays[0])
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_ndarrays);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

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

  /* "pandas/src/tseries.pyx":419
 *     n = len(ndarrays[0])
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     # initialize tuples on first pass
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __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 = 419; __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 = 419; __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 = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 419; __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 = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_result);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __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_DECREF(__pyx_v_arr);
  __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_DECREF(((PyObject *)__pyx_v_it));
  __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_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":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_1 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_5), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __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;

    /* "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_1 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_tup);
    __pyx_v_tup = __pyx_t_1;
    __pyx_t_1 = 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_bshape_0_result;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_12, __pyx_bstride_0_result);
    __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_2 = __pyx_v_k;
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_2; __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_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_arr);
    __pyx_v_arr = __pyx_t_1;
    __pyx_t_1 = 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_1 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_1)));
    __Pyx_DECREF(((PyObject *)__pyx_v_it));
    __pyx_v_it = ((PyArrayIterObject *)__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "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_1 = __pyx_v_arr;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_1), 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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__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_bshape_0_result;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_17, __pyx_bstride_0_result);
      __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_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_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_zip");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF((PyObject *)__pyx_v_it);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF(__pyx_v_tup);
  __Pyx_DECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __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_16has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_16has_infs_f4 = {__Pyx_NAMESTR("has_infs_f4"), (PyCFunction)__pyx_pf_6pandas_8_tseries_16has_infs_f4, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_16has_infs_f4(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("has_infs_f4");
  __pyx_self = __pyx_self;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.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 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":452
 *         float32_t inf, neginf, val
 * 
 *     inf = np.inf             # <<<<<<<<<<<<<<
 *     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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__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_2 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __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_bshape_0_arr;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_arr)) __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_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr));

    /* "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_L7;
    }
    __pyx_L7:;
  }

  /* "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_1);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.has_infs_f4");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_17has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_17has_infs_f8 = {__Pyx_NAMESTR("has_infs_f8"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17has_infs_f8, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_17has_infs_f8(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("has_infs_f8");
  __pyx_self = __pyx_self;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.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 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":466
 *         float64_t inf, neginf, val
 * 
 *     inf = np.inf             # <<<<<<<<<<<<<<
 *     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 = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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_2 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __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_bshape_0_arr;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_arr)) __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_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr));

    /* "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_L7;
    }
    __pyx_L7:;
  }

  /* "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_1);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.has_infs_f8");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __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_18convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_18convert_timestamps = {__Pyx_NAMESTR("convert_timestamps"), (PyCFunction)__pyx_pf_6pandas_8_tseries_18convert_timestamps, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_18convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_v_val;
  PyObject *__pyx_v_f;
  PyObject *__pyx_v_cache = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_out;
  PyObject *__pyx_v_datetime;
  Py_buffer __pyx_bstruct_out;
  Py_ssize_t __pyx_bstride_0_out = 0;
  Py_ssize_t __pyx_bshape_0_out = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("convert_timestamps");
  __pyx_self = __pyx_self;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_datetime = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_out.buf = NULL;
  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;}

  /* "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_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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(((PyObject *)__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)); 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 (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_DECREF(__pyx_v_datetime);
  __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_DECREF(__pyx_v_f);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_out);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_out, (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_bstruct_out, (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_bstride_0_out = __pyx_bstruct_out.strides[0];
    __pyx_bshape_0_out = __pyx_bstruct_out.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_DECREF(((PyObject *)__pyx_v_out));
  __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 = __pyx_v_values;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_3 = get_value_1d(((PyArrayObject *)__pyx_t_5), __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 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:
 */
    if (unlikely(__pyx_v_cache == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __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_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_cache), __pyx_v_val); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_bshape_0_out;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_out)) __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_bstruct_out.buf, __pyx_t_13, __pyx_bstride_0_out);
      __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;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":494
 *             out[i] = cache[val]
 *         else:
 *             cache[val] = out[i] = f(val)             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_5 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_3), NULL); 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_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (PyDict_SetItem(((PyObject *)__pyx_v_cache), __pyx_v_val, __pyx_t_5) < 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_bshape_0_out;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_out)) __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_bstruct_out.buf, __pyx_t_15, __pyx_bstride_0_out);
      __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;
    }
    __pyx_L7:;
  }

  /* "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_bstruct_out);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.convert_timestamps");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_cache);
  __Pyx_DECREF((PyObject *)__pyx_v_out);
  __Pyx_DECREF(__pyx_v_datetime);
  __Pyx_XGIVEREF(__pyx_r);
  __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_19scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_19scalar_compare = {__Pyx_NAMESTR("scalar_compare"), (PyCFunction)__pyx_pf_6pandas_8_tseries_19scalar_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_19scalar_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;
  PyObject *__pyx_v_operator;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_flag;
  PyObject *__pyx_v_x;
  PyObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__val,&__pyx_n_s__op,0};
  __Pyx_RefNannySetupContext("scalar_compare");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_val = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_op = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_operator = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.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); 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_DECREF(__pyx_v_operator);
  __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_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }
  /*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);
    __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_L6:;

  /* "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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_DECREF(__pyx_v_result);
  __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_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__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_L9;
    }
    /*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_6 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_t_6, __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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __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_L9:;
  }

  /* "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(((PyObject *)__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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.scalar_compare");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_operator);
  __Pyx_DECREF(__pyx_v_x);
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __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_20vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_20vec_compare = {__Pyx_NAMESTR("vec_compare"), (PyCFunction)__pyx_pf_6pandas_8_tseries_20vec_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_20vec_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;
  PyObject *__pyx_v_operator;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_flag;
  PyObject *__pyx_v_result;
  PyObject *__pyx_v_x;
  PyObject *__pyx_v_y;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__op,0};
  __Pyx_RefNannySetupContext("vec_compare");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_op = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_operator = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_y = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.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); 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_DECREF(__pyx_v_operator);
  __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_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }

  /* "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_L6;
  }
  /*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);
    __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_L6:;

  /* "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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_DECREF(__pyx_v_result);
  __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]
 *         if _checknull(x):
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_8, __pyx_bstride_0_left);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__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]             # <<<<<<<<<<<<<<
 *         if _checknull(x):
 *             result[i] = x
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_9, __pyx_bstride_0_right);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__pyx_v_y);
    __pyx_v_y = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/tseries.pyx":561
 *         x = left[i]
 *         y = right[i]
 *         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":562
 *         y = right[i]
 *         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 = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }

    /* "pandas/src/tseries.pyx":563
 *         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":564
 *             result[i] = x
 *         elif _checknull(y):
 *             result[i] = y             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 */
      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 = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":566
 *             result[i] = y
 *         else:
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
      __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 = 566; __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 = 566; __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 = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L9:;
  }

  /* "pandas/src/tseries.pyx":568
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __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 = 568; __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 = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 568; __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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.vec_compare");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_operator);
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_x);
  __Pyx_DECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":573
 * @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_21scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_21scalar_binop = {__Pyx_NAMESTR("scalar_binop"), (PyCFunction)__pyx_pf_6pandas_8_tseries_21scalar_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_21scalar_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_x;
  PyObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__val,&__pyx_n_s__op,0};
  __Pyx_RefNannySetupContext("scalar_binop");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 573; __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 = 573; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "scalar_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 573; __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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_val = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_op = PyTuple_GET_ITEM(__pyx_args, 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 = 573; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.scalar_binop");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

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

  /* "pandas/src/tseries.pyx":578
 *         object x
 * 
 *     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 = 578; __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 = 578; __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 = 578; __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 = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 578; __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 = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 578; __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;
  __Pyx_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":580
 *     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_6 = 0; __pyx_t_6 < __pyx_t_2; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/src/tseries.pyx":581
 * 
 *     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_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":582
 *     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":583
 *         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 = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":585
 *             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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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_1 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L8:;
  }

  /* "pandas/src/tseries.pyx":587
 *             result[i] = op(x, val)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 587; __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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 587; __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_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_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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.scalar_binop");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_x);
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":591
 * @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_22vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_22vec_binop = {__Pyx_NAMESTR("vec_binop"), (PyCFunction)__pyx_pf_6pandas_8_tseries_22vec_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_22vec_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_result;
  PyObject *__pyx_v_x;
  PyObject *__pyx_v_y;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__op,0};
  __Pyx_RefNannySetupContext("vec_binop");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 591; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "vec_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_op = PyTuple_GET_ITEM(__pyx_args, 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 = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.vec_binop");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_y = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "pandas/src/tseries.pyx":593
 * 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 *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":595
 *         Py_ssize_t i, n = len(left)
 * 
 *     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 = 595; __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 = 595; __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 = 595; __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 595; __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __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;
  __Pyx_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":597
 *     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_6 = 0; __pyx_t_6 < __pyx_t_2; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/src/tseries.pyx":598
 * 
 *     for i in range(n):
 *         x = left[i]             # <<<<<<<<<<<<<<
 *         y = right[i]
 *         if _checknull(x):
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_7, __pyx_bstride_0_left);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":599
 *     for i in range(n):
 *         x = left[i]
 *         y = right[i]             # <<<<<<<<<<<<<<
 *         if _checknull(x):
 *             result[i] = x
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_8, __pyx_bstride_0_right);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_y);
    __pyx_v_y = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":600
 *         x = left[i]
 *         y = right[i]
 *         if _checknull(x):             # <<<<<<<<<<<<<<
 *             result[i] = x
 *         elif _checknull(y):
 */
    __pyx_t_9 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_x);
    if (__pyx_t_9) {

      /* "pandas/src/tseries.pyx":601
 *         y = right[i]
 *         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 = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }

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

      /* "pandas/src/tseries.pyx":603
 *             result[i] = x
 *         elif _checknull(y):
 *             result[i] = y             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = op(x, y)
 */
      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 = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":605
 *             result[i] = y
 *         else:
 *             result[i] = op(x, y)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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_1 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L8:;
  }

  /* "pandas/src/tseries.pyx":607
 *             result[i] = op(x, y)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 607; __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 = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 607; __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_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_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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.vec_binop");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_x);
  __Pyx_DECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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;
  double __pyx_t_1;
  double __pyx_t_2;
  __Pyx_RefNannySetupContext("Log2");

  /* "/Users/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_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_4Node___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;
  int __pyx_r;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__next,&__pyx_n_s__width,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_value = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 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*)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_width = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_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;}

  /* "/Users/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
 */
  ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->value = __pyx_v_value;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->next);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->next));
  ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->next = __pyx_v_next;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->width);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->width));
  ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->width = __pyx_v_width;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Node.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_4Node_5value___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_6pandas_8_tseries_Node *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_4Node_5value_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_4Node_5value_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __pyx_t_5numpy_double_t __pyx_t_1;
  __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;}
  ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->value = __pyx_t_1;

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

/* "/Users/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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_4Node_4next___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->next));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__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;
}

static int __pyx_pf_6pandas_8_tseries_4Node_4next_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_4Node_4next_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->next);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->next));
  ((struct __pyx_obj_6pandas_8_tseries_Node *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

/* "/Users/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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_4Node_5width___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->width));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__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;
}

static int __pyx_pf_6pandas_8_tseries_4Node_5width_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_4Node_5width_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->width);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self)->width));
  ((struct __pyx_obj_6pandas_8_tseries_Node *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_17IndexableSkiplist___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_expected_size = 0;
  int __pyx_r;
  double __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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__expected_size,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_100);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_expected_size = ((PyObject *)__pyx_int_100);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_expected_size = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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)
 */
  ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->size = 0;

  /* "/Users/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;}
  ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->maxlevels = ((Py_ssize_t)(1.0 + __pyx_f_6pandas_8_tseries_Log2(__pyx_t_1)));

  /* "/Users/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); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__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);
  __pyx_t_5 = PyNumber_Multiply(((PyObject *)__pyx_t_4), __pyx_t_2); 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);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __pyx_t_4 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__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);
  __pyx_t_6 = PyNumber_Multiply(((PyObject *)__pyx_t_2), __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Node)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->head);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->head));
  ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->head = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_6);
  __pyx_t_6 = 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_1__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannySetupContext("__len__");

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

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

/* "/Users/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_2__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_2__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getitem__");

  /* "/Users/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 *)((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->__pyx_vtab)->get(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_3get(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;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("get");
  __pyx_v_node = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  /* 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_pf_6pandas_8_tseries_17IndexableSkiplist_3get)) {
      __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(((PyObject *)__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;
  }

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

  /* "/Users/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);

  /* "/Users/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;

    /* "/Users/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;

      /* "/Users/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;

      /* "/Users/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;
    }
  }

  /* "/Users/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_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_3get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_3get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get");
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->__pyx_vtab)->get(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_4insert(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;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_prevnode;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_newnode;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_next_at_level;
  PyObject *__pyx_v_chain;
  PyObject *__pyx_v_steps_at_level;
  PyObject *__pyx_r = NULL;
  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;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("insert");
  __pyx_v_node = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_prevnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_newnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_next_at_level = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_chain = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_steps_at_level = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  /* 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_pf_6pandas_8_tseries_17IndexableSkiplist_4insert)) {
      __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(((PyObject *)__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;
  }

  /* "/Users/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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->maxlevels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_chain));
  __pyx_v_chain = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->maxlevels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_t_3), __pyx_t_2); 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);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  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[4]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_steps_at_level));
  __pyx_v_steps_at_level = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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_DECREF(((PyObject *)__pyx_v_node));
  __pyx_v_node = __pyx_v_self->head;

  /* "/Users/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;

    /* "/Users/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_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;

    /* "/Users/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;

      /* "/Users/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);

      /* "/Users/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;

      /* "/Users/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;

      /* "/Users/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;

      /* "/Users/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;
    }

    /* "/Users/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;}
  }

  /* "/Users/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(((PyObject *)__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;

  /* "/Users/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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_3, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_t_7 = PyInt_FromSsize_t(__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);
  __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_t_3), __pyx_t_7); 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);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_7, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_t_3 = PyInt_FromSsize_t(__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);
  __pyx_t_8 = PyNumber_Multiply(((PyObject *)__pyx_t_7), __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Node)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_newnode));
  __pyx_v_newnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "/Users/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;

  /* "/Users/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_9 = 0; __pyx_t_9 < __pyx_t_4; __pyx_t_9+=1) {
    __pyx_v_level = __pyx_t_9;

    /* "/Users/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_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_8) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_prevnode));
    __pyx_v_prevnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "/Users/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_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_8) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_newnode->next), __pyx_v_level, __pyx_t_8, 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_8); __pyx_t_8 = 0;

    /* "/Users/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;}

    /* "/Users/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_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_8) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_steps); 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_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_3); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_newnode->width), __pyx_v_level, __pyx_t_1, 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_1); __pyx_t_1 = 0;

    /* "/Users/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_1 = PyInt_FromSsize_t((__pyx_v_steps + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->width), __pyx_v_level, __pyx_t_1, 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_1); __pyx_t_1 = 0;

    /* "/Users/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_1 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__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_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__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_8 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (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_8); __pyx_t_8 = 0;
    __pyx_v_steps = __pyx_t_10;
  }

  /* "/Users/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_9 = __pyx_v_d; __pyx_t_9 < __pyx_t_4; __pyx_t_9+=1) {
    __pyx_v_level = __pyx_t_9;

    /* "/Users/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_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_8) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_8)->width));
    __pyx_t_11 = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_8)->width;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = __pyx_v_level;
    __pyx_t_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_11), __pyx_t_10, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_8) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_t_11), __pyx_t_10, __pyx_t_3, 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_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  }

  /* "/Users/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(__pyx_t_8);
  __Pyx_XDECREF(((PyObject *)__pyx_t_11));
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.insert");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_node);
  __Pyx_DECREF((PyObject *)__pyx_v_prevnode);
  __Pyx_DECREF((PyObject *)__pyx_v_newnode);
  __Pyx_DECREF((PyObject *)__pyx_v_next_at_level);
  __Pyx_DECREF(__pyx_v_chain);
  __Pyx_DECREF(__pyx_v_steps_at_level);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_4insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_4insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("insert");
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->__pyx_vtab)->insert(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_5remove(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;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_prevnode;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_tmpnode;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_next_at_level;
  PyObject *__pyx_v_chain;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("remove");
  __pyx_v_node = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_prevnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_tmpnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_next_at_level = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_chain = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  /* 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_pf_6pandas_8_tseries_17IndexableSkiplist_5remove)) {
      __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(((PyObject *)__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;
  }

  /* "/Users/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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->maxlevels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_chain));
  __pyx_v_chain = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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_DECREF(((PyObject *)__pyx_v_node));
  __pyx_v_node = __pyx_v_self->head;

  /* "/Users/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;

    /* "/Users/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_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 = 130; __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 = 130; __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;

    /* "/Users/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;

      /* "/Users/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;

      /* "/Users/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_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 = 133; __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 = 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_3);
      __pyx_t_3 = 0;
    }

    /* "/Users/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;}
  }

  /* "/Users/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_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_3)->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_3); __pyx_t_3 = 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) {

    /* "/Users/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);
    __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:;

  /* "/Users/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_3 = __Pyx_GetItemInt(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2)->next), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_3)->next);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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;

  /* "/Users/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;

    /* "/Users/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_DECREF(((PyObject *)__pyx_v_prevnode));
    __pyx_v_prevnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Users/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_DECREF(((PyObject *)__pyx_v_tmpnode));
    __pyx_v_tmpnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Users/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_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tmpnode->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_int_1); 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_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_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_2); __pyx_t_2 = 0;
    __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 = 146; __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;

    /* "/Users/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_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tmpnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, __pyx_t_3, 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_3); __pyx_t_3 = 0;
  }

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/skiplist.pyx":150
 * 
 *         for level in range(d, self.maxlevels):
 *             tmpnode = chain[level]             # <<<<<<<<<<<<<<
 *             tmpnode.width[level] -= 1
 * 
 */
    __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 150; __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 = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_tmpnode));
    __pyx_v_tmpnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Users/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_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_7), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 151; __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;
  }

  /* "/Users/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_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_node);
  __Pyx_DECREF((PyObject *)__pyx_v_prevnode);
  __Pyx_DECREF((PyObject *)__pyx_v_tmpnode);
  __Pyx_DECREF((PyObject *)__pyx_v_next_at_level);
  __Pyx_DECREF(__pyx_v_chain);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_5remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_5remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("remove");
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self)->__pyx_vtab)->remove(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_23arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_23arrmap = {__Pyx_NAMESTR("arrmap"), (PyCFunction)__pyx_pf_6pandas_8_tseries_23arrmap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_23arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  int __pyx_v_length;
  int __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("arrmap");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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]);

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_index;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_8, __pyx_bstride_0_index);
    __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(((PyObject *)__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_bshape_0_result;
    __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_9, __pyx_bstride_0_result);
    __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;
  }

  /* "/Users/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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_24groupby_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_24groupby_func = {__Pyx_NAMESTR("groupby_func"), (PyCFunction)__pyx_pf_6pandas_8_tseries_24groupby_func, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_24groupby_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_mapper = 0;
  PyObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_mapped_index;
  PyArrayObject *__pyx_v_index_buf;
  PyArrayObject *__pyx_v_mask;
  int __pyx_v_i;
  int __pyx_v_length;
  PyObject *__pyx_v_members;
  PyObject *__pyx_v_idx;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_index_buf;
  Py_ssize_t __pyx_bstride_0_index_buf = 0;
  Py_ssize_t __pyx_bshape_0_index_buf = 0;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_mapped_index;
  Py_ssize_t __pyx_bstride_0_mapped_index = 0;
  Py_ssize_t __pyx_bshape_0_mapped_index = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__mapper,0};
  __Pyx_RefNannySetupContext("groupby_func");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_mapper = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_mapped_index = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_index_buf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_mask = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_members = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_mapped_index.buf = NULL;
  __pyx_bstruct_index_buf.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;

  /* "/Users/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;

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

  /* "/Users/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(((PyObject *)__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_bstruct_index_buf);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_index_buf, (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_bstruct_index_buf, (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_bstride_0_index_buf = __pyx_bstruct_index_buf.strides[0];
    __pyx_bshape_0_index_buf = __pyx_bstruct_index_buf.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_DECREF(((PyObject *)__pyx_v_index_buf));
  __pyx_v_index_buf = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Users/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(((PyObject *)__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_bstruct_mapped_index);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_mapped_index, (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_bstruct_mapped_index, (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_bstride_0_mapped_index = __pyx_bstruct_mapped_index.strides[0];
    __pyx_bshape_0_mapped_index = __pyx_bstruct_mapped_index.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_DECREF(((PyObject *)__pyx_v_mapped_index));
  __pyx_v_mapped_index = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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(((PyObject *)__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_bstruct_mask);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
    __pyx_bshape_0_mask = __pyx_bstruct_mask.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_DECREF(((PyObject *)__pyx_v_mask));
  __pyx_v_mask = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_mask;
    __pyx_t_13 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask));
    if (__pyx_t_13) {

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

    /* "/Users/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_bshape_0_mapped_index;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_14, __pyx_bstride_0_mapped_index);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/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_bshape_0_index_buf;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index_buf.buf, __pyx_t_15, __pyx_bstride_0_index_buf);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/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)
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __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) {

      /* "/Users/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_DECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":40
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(__pyx_v_members == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute '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_L9;
    }
    /*else*/ {

      /* "/Users/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(((PyObject *)__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_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/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_bstruct_index_buf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mapped_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_func");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index_buf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mapped_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF((PyObject *)__pyx_v_mapped_index);
  __Pyx_DECREF((PyObject *)__pyx_v_index_buf);
  __Pyx_DECREF((PyObject *)__pyx_v_mask);
  __Pyx_DECREF(__pyx_v_members);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_25func_groupby_indices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_25func_groupby_indices = {__Pyx_NAMESTR("func_groupby_indices"), (PyCFunction)__pyx_pf_6pandas_8_tseries_25func_groupby_indices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_25func_groupby_indices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_mapper = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__mapper,0};
  __Pyx_RefNannySetupContext("func_groupby_indices");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_mapper = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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(((PyObject *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_26groupby_indices_naive(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_groupby_indices_naive(PyArrayObject *__pyx_v_values, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_result;
  PyArrayObject *__pyx_v_mask;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_10;
  __pyx_t_5numpy_int8_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  __Pyx_RefNannySetupContext("groupby_indices_naive");
  __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_mask = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_mask.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

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

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":58
 * 
 *     result = {}
 *     mask = isnullobj(values)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < length:
 *         if mask[i]:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __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 = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1, ((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_1); __pyx_t_1 = 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_bstruct_mask);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
    __pyx_bshape_0_mask = __pyx_bstruct_mask.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_DECREF(((PyObject *)__pyx_v_mask));
  __pyx_v_mask = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

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

    /* "/Users/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_bshape_0_mask;
    __pyx_t_11 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_bstruct_mask.buf, __pyx_t_10, __pyx_bstride_0_mask));
    if (__pyx_t_11) {

      /* "/Users/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:;

    /* "/Users/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_bshape_0_values;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_12, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":64
 * 
 *         key = values[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             (<list> result[key]).append(i)
 *         else:
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __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) {

      /* "/Users/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(((PyObject*)__pyx_t_4) == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute '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_6 = PyList_Append(((PyObject*)__pyx_t_4), __pyx_t_3); if (unlikely(__pyx_t_6 == -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*/ {

      /* "/Users/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(((PyObject *)__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:;
  }

  /* "/Users/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_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_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_indices_naive");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_DECREF((PyObject *)__pyx_v_mask);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_26groupby_indices_naive(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_26groupby_indices_naive(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("groupby_indices_naive");
  __pyx_self = __pyx_self;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_groupby_indices_naive(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_indices_naive");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_27groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_27groupby_indices = {__Pyx_NAMESTR("groupby_indices"), (PyCFunction)__pyx_pf_6pandas_8_tseries_27groupby_indices, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_27groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels;
  PyArrayObject *__pyx_v_counts;
  PyArrayObject *__pyx_v_arr;
  PyArrayObject *__pyx_v_seen;
  __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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_seen;
  Py_ssize_t __pyx_bstride_0_seen = 0;
  Py_ssize_t __pyx_bshape_0_seen = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_int32_t __pyx_t_16;
  __Pyx_RefNannySetupContext("groupby_indices");
  __pyx_self = __pyx_self;
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_seen = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  __pyx_bstruct_seen.buf = NULL;
  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;}

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_ids = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":81
 *         int32_t k
 * 
 *     ids, labels, counts = group_labels(values)             # <<<<<<<<<<<<<<
 *     seen = np.zeros_like(counts)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__group_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __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 = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((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_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 3)) {
    PyObject* tuple = __pyx_t_4;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    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;}
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
    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(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_ids));
    __pyx_v_ids = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
      __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_labels));
    __pyx_v_labels = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
      __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_counts));
    __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  } else {
    __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_11, 0); 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);
    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;}
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_11, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_11, 3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_ids));
    __pyx_v_ids = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
      __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_labels));
    __pyx_v_labels = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
      __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_counts));
    __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  }

  /* "/Users/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(((PyObject *)__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_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __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;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_seen);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_seen, (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_bstruct_seen, (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_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_bstride_0_seen = __pyx_bstruct_seen.strides[0];
    __pyx_bshape_0_seen = __pyx_bstruct_seen.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_seen));
  __pyx_v_seen = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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(__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_2 = PyDict_Size(((PyObject *)__pyx_v_ids)); 
  __pyx_v_vecs = ((__pyx_t_5numpy_int32_t **)malloc((__pyx_t_2 * (sizeof(__pyx_t_5numpy_int32_t *)))));

  /* "/Users/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_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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_2 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_2 == -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_2; __pyx_v_i++) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __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[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_v_i;
    if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_counts;
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_12, __pyx_bstride_0_counts))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __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[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __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_11 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __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;
    if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_11);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstruct_arr, (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_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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
      __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_11);
    __pyx_t_11 = 0;

    /* "/Users/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_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_ids), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_11) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_11, ((PyObject *)__pyx_v_arr)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "/Users/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);
  }

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":93
 * 
 *     for i from 0 <= i < n:
 *         k = labels[i]             # <<<<<<<<<<<<<<
 * 
 *         # was NaN
 */
    __pyx_t_13 = __pyx_v_i;
    if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_labels;
    __pyx_v_k = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels));

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

      /* "/Users/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:;

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":99
 *             continue
 * 
 *         loc = seen[k]             # <<<<<<<<<<<<<<
 *         vecs[k][loc] = i
 *         seen[k] = loc + 1
 */
    __pyx_t_15 = __pyx_v_k;
    if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_seen;
    __pyx_v_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_seen.buf, __pyx_t_15, __pyx_bstride_0_seen));

    /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":101
 *         loc = seen[k]
 *         vecs[k][loc] = i
 *         seen[k] = loc + 1             # <<<<<<<<<<<<<<
 * 
 *     free(vecs)
 */
    __pyx_t_16 = __pyx_v_k;
    if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_0_seen;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_seen.buf, __pyx_t_16, __pyx_bstride_0_seen) = (__pyx_v_loc + 1);
    __pyx_L7_continue:;
  }

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

  /* "/Users/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_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_seen);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_indices");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_seen);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF((PyObject *)__pyx_v_arr);
  __Pyx_DECREF((PyObject *)__pyx_v_seen);
  __Pyx_XDECREF(__pyx_v_ids);
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_28is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_28is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pf_6pandas_8_tseries_28is_lexsorted, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_28is_lexsorted(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;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("is_lexsorted");
  __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;}

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":115
 *         int32_t k, cur, pre
 * 
 *     nlevels = len(list_of_arrays)             # <<<<<<<<<<<<<<
 *     n = len(list_of_arrays[0])
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_list_of_arrays);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nlevels = __pyx_t_2;

  /* "/Users/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_1 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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 *)))));

  /* "/Users/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_2 = __pyx_v_nlevels;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_list_of_arrays), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int32_t *)((PyArrayObject *)__pyx_t_1)->data);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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++) {

      /* "/Users/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]);

      /* "/Users/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)]);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":128
 *             pre = vecs[k][i-1]
 *             if cur == pre:
 *                 continue             # <<<<<<<<<<<<<<
 *             elif cur > pre:
 *                 break
 */
        goto __pyx_L9_continue;
        goto __pyx_L11;
      }

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":130
 *                 continue
 *             elif cur > pre:
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 return False
 */
        goto __pyx_L10_break;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":132
 *                 break
 *             else:
 *                 return False             # <<<<<<<<<<<<<<
 *     free(vecs)
 *     return True
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 132; __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_L11:;
      __pyx_L9_continue:;
    }
    __pyx_L10_break:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":133
 *             else:
 *                 return False
 *     free(vecs)             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
  free(__pyx_v_vecs);

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":134
 *                 return False
 *     free(vecs)
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; __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_lexsorted");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_29group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static char __pyx_doc_6pandas_8_tseries_29group_labels[] = "\n    Compute label vector from input values and associated useful data\n\n    Returns\n    -------\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_29group_labels = {__Pyx_NAMESTR("group_labels"), (PyCFunction)__pyx_pf_6pandas_8_tseries_29group_labels, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_29group_labels)};
static PyObject *__pyx_pf_6pandas_8_tseries_29group_labels(PyObject *__pyx_self, PyObject *__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;
  __pyx_t_5numpy_int32_t __pyx_v_count;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("group_labels");
  __pyx_self = __pyx_self;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __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[5]; __pyx_lineno = 147; __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 = 147; __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 = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 147; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 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_bstruct_labels, (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_bstruct_labels.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_labels = __pyx_bstruct_labels.strides[0];
      __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __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_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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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_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_bstruct_counts, (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_bstruct_counts.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_counts = __pyx_bstruct_counts.strides[0];
      __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":154
 *         int32_t count = 0
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bstruct_values.buf, __pyx_t_9, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/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) {

      /* "/Users/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_bstruct_labels.buf, __pyx_t_11, __pyx_bstride_0_labels) = -1;

      /* "/Users/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_L5_continue;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/Users/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
 */
    if (unlikely(__pyx_v_ids == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __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) {

      /* "/Users/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;

      /* "/Users/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_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/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_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_12, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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;

      /* "/Users/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;}

      /* "/Users/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_bstruct_labels.buf, __pyx_t_15, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/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_bstruct_counts.buf, __pyx_t_16, __pyx_bstride_0_counts) = 1;

      /* "/Users/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_L8:;
    __pyx_L5_continue:;
  }

  /* "/Users/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(((PyObject *)__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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_labels");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __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_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_30get_unique_labels(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_30get_unique_labels = {__Pyx_NAMESTR("get_unique_labels"), (PyCFunction)__pyx_pf_6pandas_8_tseries_30get_unique_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_30get_unique_labels(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_idMap = 0;
  int __pyx_v_i;
  int __pyx_v_length;
  PyObject *__pyx_v_idx;
  PyArrayObject *__pyx_v_fillVec;
  Py_buffer __pyx_bstruct_fillVec;
  Py_ssize_t __pyx_bstride_0_fillVec = 0;
  Py_ssize_t __pyx_bshape_0_fillVec = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_12;
  __pyx_t_5numpy_int32_t __pyx_t_13;
  int __pyx_t_14;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__idMap,0};
  __Pyx_RefNannySetupContext("get_unique_labels");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_idMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_fillVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fillVec.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __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[5]; __pyx_lineno = 185; __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_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 185; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fillVec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fillVec, (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_bstruct_fillVec, (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_bstride_0_fillVec = __pyx_bstruct_fillVec.strides[0];
    __pyx_bshape_0_fillVec = __pyx_bstruct_fillVec.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_DECREF(((PyObject *)__pyx_v_fillVec));
  __pyx_v_fillVec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_values.buf, __pyx_t_12, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Users/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_bstruct_fillVec.buf, __pyx_t_14, __pyx_bstride_0_fillVec) = __pyx_t_13;
  }

  /* "/Users/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_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_bstruct_fillVec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_unique_labels");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fillVec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF((PyObject *)__pyx_v_fillVec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_31groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_31groupsort_indexer = {__Pyx_NAMESTR("groupsort_indexer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_31groupsort_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_31groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  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;
  PyArrayObject *__pyx_v_where;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_buffer __pyx_bstruct_where;
  Py_ssize_t __pyx_bstride_0_where = 0;
  Py_ssize_t __pyx_bshape_0_where = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__ngroups,0};
  __Pyx_RefNannySetupContext("groupsort_indexer");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_where = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_where.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_counts);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.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_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Users/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_4 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_n = __pyx_t_10;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_index.buf, __pyx_t_11, __pyx_bstride_0_index)) + 1);
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_12, __pyx_bstride_0_counts) += 1;
  }

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_where);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_where, (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_bstruct_where, (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_bstride_0_where = __pyx_bstruct_where.strides[0];
    __pyx_bshape_0_where = __pyx_bstruct_where.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_DECREF(((PyObject *)__pyx_v_where));
  __pyx_v_where = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_where.buf, __pyx_t_15, __pyx_bstride_0_where) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_where.buf, __pyx_t_13, __pyx_bstride_0_where)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts)));
  }

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_index.buf, __pyx_t_16, __pyx_bstride_0_index)) + 1);

    /* "/Users/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_bstruct_where.buf, __pyx_t_17, __pyx_bstride_0_where));
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_result.buf, __pyx_t_18, __pyx_bstride_0_result) = __pyx_v_i;

    /* "/Users/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_bstruct_where.buf, __pyx_t_19, __pyx_bstride_0_where) += 1;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_where);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupsort_indexer");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_where);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF((PyObject *)__pyx_v_where);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_32group_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_32group_add[] = "\n    Only aggregates on axis=0\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_32group_add = {__Pyx_NAMESTR("group_add"), (PyCFunction)__pyx_pf_6pandas_8_tseries_32group_add, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_32group_add)};
static PyObject *__pyx_pf_6pandas_8_tseries_32group_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;
  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;
  PyArrayObject *__pyx_v_nobs;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_sumx;
  Py_ssize_t __pyx_bstride_0_sumx = 0;
  Py_ssize_t __pyx_bstride_1_sumx = 0;
  Py_ssize_t __pyx_bshape_0_sumx = 0;
  Py_ssize_t __pyx_bshape_1_sumx = 0;
  Py_buffer __pyx_bstruct_nobs;
  Py_ssize_t __pyx_bstride_0_nobs = 0;
  Py_ssize_t __pyx_bstride_1_nobs = 0;
  Py_ssize_t __pyx_bshape_0_nobs = 0;
  Py_ssize_t __pyx_bshape_1_nobs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_buffer __pyx_bstruct_out;
  Py_ssize_t __pyx_bstride_0_out = 0;
  Py_ssize_t __pyx_bstride_1_out = 0;
  Py_ssize_t __pyx_bshape_0_out = 0;
  Py_ssize_t __pyx_bshape_1_out = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  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;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  long __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  long __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  long __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;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("group_add");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_counts = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_sumx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_nobs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_sumx.buf = NULL;
  __pyx_bstruct_nobs.buf = NULL;
  __pyx_bstruct_out.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_labels.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_out, (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_bstride_0_out = __pyx_bstruct_out.strides[0]; __pyx_bstride_1_out = __pyx_bstruct_out.strides[1];
  __pyx_bshape_0_out = __pyx_bstruct_out.shape[0]; __pyx_bshape_1_out = __pyx_bstruct_out.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
  __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
  __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];

  /* "/Users/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(((PyObject *)__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_bstruct_nobs);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_nobs, (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_bstruct_nobs, (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_bstride_0_nobs = __pyx_bstruct_nobs.strides[0]; __pyx_bstride_1_nobs = __pyx_bstruct_nobs.strides[1];
    __pyx_bshape_0_nobs = __pyx_bstruct_nobs.shape[0]; __pyx_bshape_1_nobs = __pyx_bstruct_nobs.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_DECREF(((PyObject *)__pyx_v_nobs));
  __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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(((PyObject *)__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_bstruct_sumx);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_sumx, (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_bstruct_sumx, (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_bstride_0_sumx = __pyx_bstruct_sumx.strides[0]; __pyx_bstride_1_sumx = __pyx_bstruct_sumx.strides[1];
    __pyx_bshape_0_sumx = __pyx_bstruct_sumx.shape[0]; __pyx_bshape_1_sumx = __pyx_bstruct_sumx.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_DECREF(((PyObject *)__pyx_v_sumx));
  __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
    PyObject* tuple = __pyx_t_2;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (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_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_N = __pyx_t_9;
    __pyx_v_K = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_11, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_10 == (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_1 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (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;
    if (__Pyx_EndUnpack(__pyx_t_11, 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_N = __pyx_t_10;
    __pyx_v_K = __pyx_t_9;
  }

  /* "/Users/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_12 = (__pyx_v_K > 1);
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":242
 * 
 *     if K > 1:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             lab = labels[i]
 *             if lab < 0:
 */
    __pyx_t_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/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_13 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":244
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_12 = (__pyx_v_lab < 0);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":245
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":247
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             for j in range(K):
 *                 val = values[i, j]
 */
      __pyx_t_14 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts) += 1;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":248
 * 
 *             counts[lab] += 1
 *             for j in range(K):             # <<<<<<<<<<<<<<
 *                 val = values[i, j]
 * 
 */
      __pyx_t_15 = __pyx_v_K;
      for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
        __pyx_v_j = __pyx_t_16;

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":249
 *             counts[lab] += 1
 *             for j in range(K):
 *                 val = values[i, j]             # <<<<<<<<<<<<<<
 * 
 *                 # not nan
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_18 = __pyx_v_j;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":252
 * 
 *                 # not nan
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val
 */
        __pyx_t_12 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_12) {

          /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":253
 *                 # not nan
 *                 if val == val:
 *                     nobs[lab, j] += 1             # <<<<<<<<<<<<<<
 *                     sumx[lab, j] += val
 *     else:
 */
          __pyx_t_19 = __pyx_v_lab;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_19, __pyx_bstride_0_nobs, __pyx_t_20, __pyx_bstride_1_nobs) += 1;

          /* "/Users/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_21 = __pyx_v_lab;
          __pyx_t_22 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_21, __pyx_bstride_0_sumx, __pyx_t_22, __pyx_bstride_1_sumx) += __pyx_v_val;
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      __pyx_L7_continue:;
    }
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":257
 *     else:
 *         for i in range(N):
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_15, __pyx_bstride_0_labels));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":258
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_12 = (__pyx_v_lab < 0);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":259
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L13_continue;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":261
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             val = values[i, 0]
 * 
 */
      __pyx_t_16 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_16, __pyx_bstride_0_counts) += 1;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":262
 * 
 *             counts[lab] += 1
 *             val = values[i, 0]             # <<<<<<<<<<<<<<
 * 
 *             # not nan
 */
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_24 = 0;
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_23, __pyx_bstride_0_values, __pyx_t_24, __pyx_bstride_1_values));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":265
 * 
 *             # not nan
 *             if val == val:             # <<<<<<<<<<<<<<
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val
 */
      __pyx_t_12 = (__pyx_v_val == __pyx_v_val);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":266
 *             # not nan
 *             if val == val:
 *                 nobs[lab, 0] += 1             # <<<<<<<<<<<<<<
 *                 sumx[lab, 0] += val
 * 
 */
        __pyx_t_25 = __pyx_v_lab;
        __pyx_t_26 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_25, __pyx_bstride_0_nobs, __pyx_t_26, __pyx_bstride_1_nobs) += 1;

        /* "/Users/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_27 = __pyx_v_lab;
        __pyx_t_28 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_27, __pyx_bstride_0_sumx, __pyx_t_28, __pyx_bstride_1_sumx) += __pyx_v_val;
        goto __pyx_L16;
      }
      __pyx_L16:;
      __pyx_L13_continue:;
    }
  }
  __pyx_L6:;

  /* "/Users/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_2 = ((PyObject *)__pyx_v_counts);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_9 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "/Users/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_29 = __pyx_v_K;
    for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_29; __pyx_t_30+=1) {
      __pyx_v_j = __pyx_t_30;

      /* "/Users/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_31 = __pyx_v_i;
      __pyx_t_32 = __pyx_v_j;
      __pyx_t_12 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_31, __pyx_bstride_0_nobs, __pyx_t_32, __pyx_bstride_1_nobs)) == 0.0);
      if (__pyx_t_12) {

        /* "/Users/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_33 = __pyx_v_i;
        __pyx_t_34 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_33, __pyx_bstride_0_out, __pyx_t_34, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_nan;
        goto __pyx_L21;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":274
 *                 out[i, j] = nan
 *             else:
 *                 out[i, j] = sumx[i, j]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
        __pyx_t_35 = __pyx_v_i;
        __pyx_t_36 = __pyx_v_j;
        __pyx_t_37 = __pyx_v_i;
        __pyx_t_38 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_37, __pyx_bstride_0_out, __pyx_t_38, __pyx_bstride_1_out) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_35, __pyx_bstride_0_sumx, __pyx_t_36, __pyx_bstride_1_sumx));
      }
      __pyx_L21:;
    }
  }

  __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_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumx);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nobs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_add");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumx);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nobs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_sumx);
  __Pyx_DECREF((PyObject *)__pyx_v_nobs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_33group_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_33group_mean = {__Pyx_NAMESTR("group_mean"), (PyCFunction)__pyx_pf_6pandas_8_tseries_33group_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_33group_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;
  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;
  PyArrayObject *__pyx_v_nobs;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_sumx;
  Py_ssize_t __pyx_bstride_0_sumx = 0;
  Py_ssize_t __pyx_bstride_1_sumx = 0;
  Py_ssize_t __pyx_bshape_0_sumx = 0;
  Py_ssize_t __pyx_bshape_1_sumx = 0;
  Py_buffer __pyx_bstruct_nobs;
  Py_ssize_t __pyx_bstride_0_nobs = 0;
  Py_ssize_t __pyx_bstride_1_nobs = 0;
  Py_ssize_t __pyx_bshape_0_nobs = 0;
  Py_ssize_t __pyx_bshape_1_nobs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_buffer __pyx_bstruct_out;
  Py_ssize_t __pyx_bstride_0_out = 0;
  Py_ssize_t __pyx_bstride_1_out = 0;
  Py_ssize_t __pyx_bshape_0_out = 0;
  Py_ssize_t __pyx_bshape_1_out = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  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;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  long __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  long __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  long __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;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  __pyx_t_5numpy_float64_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  Py_ssize_t __pyx_t_41;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("group_mean");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_counts = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_sumx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_nobs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_sumx.buf = NULL;
  __pyx_bstruct_nobs.buf = NULL;
  __pyx_bstruct_out.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_labels.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_out, (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_bstride_0_out = __pyx_bstruct_out.strides[0]; __pyx_bstride_1_out = __pyx_bstruct_out.strides[1];
  __pyx_bshape_0_out = __pyx_bstruct_out.shape[0]; __pyx_bshape_1_out = __pyx_bstruct_out.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
  __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
  __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];

  /* "/Users/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(((PyObject *)__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_bstruct_nobs);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_nobs, (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_bstruct_nobs, (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_bstride_0_nobs = __pyx_bstruct_nobs.strides[0]; __pyx_bstride_1_nobs = __pyx_bstruct_nobs.strides[1];
    __pyx_bshape_0_nobs = __pyx_bstruct_nobs.shape[0]; __pyx_bshape_1_nobs = __pyx_bstruct_nobs.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_DECREF(((PyObject *)__pyx_v_nobs));
  __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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(((PyObject *)__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_bstruct_sumx);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_sumx, (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_bstruct_sumx, (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_bstride_0_sumx = __pyx_bstruct_sumx.strides[0]; __pyx_bstride_1_sumx = __pyx_bstruct_sumx.strides[1];
    __pyx_bshape_0_sumx = __pyx_bstruct_sumx.shape[0]; __pyx_bshape_1_sumx = __pyx_bstruct_sumx.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_DECREF(((PyObject *)__pyx_v_sumx));
  __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
    PyObject* tuple = __pyx_t_2;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (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_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_N = __pyx_t_9;
    __pyx_v_K = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_11, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_10 == (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_1 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (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;
    if (__Pyx_EndUnpack(__pyx_t_11, 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_N = __pyx_t_10;
    __pyx_v_K = __pyx_t_9;
  }

  /* "/Users/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_12 = (__pyx_v_K > 1);
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":293
 * 
 *     if K > 1:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             lab = labels[i]
 *             if lab < 0:
 */
    __pyx_t_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/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_13 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":295
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_12 = (__pyx_v_lab < 0);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":296
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":298
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             for j in range(K):
 *                 val = values[i, j]
 */
      __pyx_t_14 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts) += 1;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":299
 * 
 *             counts[lab] += 1
 *             for j in range(K):             # <<<<<<<<<<<<<<
 *                 val = values[i, j]
 *                 # not nan
 */
      __pyx_t_15 = __pyx_v_K;
      for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
        __pyx_v_j = __pyx_t_16;

        /* "/Users/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_17 = __pyx_v_i;
        __pyx_t_18 = __pyx_v_j;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));

        /* "/Users/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_12 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_12) {

          /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":303
 *                 # not nan
 *                 if val == val:
 *                     nobs[lab, j] += 1             # <<<<<<<<<<<<<<
 *                     sumx[lab, j] += val
 *     else:
 */
          __pyx_t_19 = __pyx_v_lab;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_19, __pyx_bstride_0_nobs, __pyx_t_20, __pyx_bstride_1_nobs) += 1;

          /* "/Users/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_21 = __pyx_v_lab;
          __pyx_t_22 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_21, __pyx_bstride_0_sumx, __pyx_t_22, __pyx_bstride_1_sumx) += __pyx_v_val;
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      __pyx_L7_continue:;
    }
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":307
 *     else:
 *         for i in range(N):
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_15, __pyx_bstride_0_labels));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":308
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_12 = (__pyx_v_lab < 0);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":309
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L13_continue;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":311
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             val = values[i, 0]
 *             # not nan
 */
      __pyx_t_16 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_16, __pyx_bstride_0_counts) += 1;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":312
 * 
 *             counts[lab] += 1
 *             val = values[i, 0]             # <<<<<<<<<<<<<<
 *             # not nan
 *             if val == val:
 */
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_24 = 0;
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_23, __pyx_bstride_0_values, __pyx_t_24, __pyx_bstride_1_values));

      /* "/Users/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_12 = (__pyx_v_val == __pyx_v_val);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":315
 *             # not nan
 *             if val == val:
 *                 nobs[lab, 0] += 1             # <<<<<<<<<<<<<<
 *                 sumx[lab, 0] += val
 * 
 */
        __pyx_t_25 = __pyx_v_lab;
        __pyx_t_26 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_25, __pyx_bstride_0_nobs, __pyx_t_26, __pyx_bstride_1_nobs) += 1;

        /* "/Users/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_27 = __pyx_v_lab;
        __pyx_t_28 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_27, __pyx_bstride_0_sumx, __pyx_t_28, __pyx_bstride_1_sumx) += __pyx_v_val;
        goto __pyx_L16;
      }
      __pyx_L16:;
      __pyx_L13_continue:;
    }
  }
  __pyx_L6:;

  /* "/Users/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_2 = ((PyObject *)__pyx_v_counts);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_9 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "/Users/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_29 = __pyx_v_K;
    for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_29; __pyx_t_30+=1) {
      __pyx_v_j = __pyx_t_30;

      /* "/Users/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_31 = __pyx_v_i;
      __pyx_t_32 = __pyx_v_j;
      __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_31, __pyx_bstride_0_nobs, __pyx_t_32, __pyx_bstride_1_nobs));

      /* "/Users/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_33 = __pyx_v_i;
      __pyx_t_34 = __pyx_v_j;
      __pyx_t_12 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_33, __pyx_bstride_0_nobs, __pyx_t_34, __pyx_bstride_1_nobs)) == 0.0);
      if (__pyx_t_12) {

        /* "/Users/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_35 = __pyx_v_i;
        __pyx_t_36 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_35, __pyx_bstride_0_out, __pyx_t_36, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_nan;
        goto __pyx_L21;
      }
      /*else*/ {

        /* "/Users/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_37 = __pyx_v_i;
        __pyx_t_38 = __pyx_v_j;
        __pyx_t_39 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_37, __pyx_bstride_0_sumx, __pyx_t_38, __pyx_bstride_1_sumx));
        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_40 = __pyx_v_i;
        __pyx_t_41 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_40, __pyx_bstride_0_out, __pyx_t_41, __pyx_bstride_1_out) = (__pyx_t_39 / __pyx_v_count);
      }
      __pyx_L21:;
    }
  }

  __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_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumx);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nobs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_mean");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumx);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nobs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_sumx);
  __Pyx_DECREF((PyObject *)__pyx_v_nobs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_34group_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_34group_var = {__Pyx_NAMESTR("group_var"), (PyCFunction)__pyx_pf_6pandas_8_tseries_34group_var, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_34group_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;
  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;
  PyArrayObject *__pyx_v_sumx;
  PyArrayObject *__pyx_v_sumxx;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_sumx;
  Py_ssize_t __pyx_bstride_0_sumx = 0;
  Py_ssize_t __pyx_bstride_1_sumx = 0;
  Py_ssize_t __pyx_bshape_0_sumx = 0;
  Py_ssize_t __pyx_bshape_1_sumx = 0;
  Py_buffer __pyx_bstruct_nobs;
  Py_ssize_t __pyx_bstride_0_nobs = 0;
  Py_ssize_t __pyx_bstride_1_nobs = 0;
  Py_ssize_t __pyx_bshape_0_nobs = 0;
  Py_ssize_t __pyx_bshape_1_nobs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  Py_buffer __pyx_bstruct_sumxx;
  Py_ssize_t __pyx_bstride_0_sumxx = 0;
  Py_ssize_t __pyx_bstride_1_sumxx = 0;
  Py_ssize_t __pyx_bshape_0_sumxx = 0;
  Py_ssize_t __pyx_bshape_1_sumxx = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_buffer __pyx_bstruct_out;
  Py_ssize_t __pyx_bstride_0_out = 0;
  Py_ssize_t __pyx_bstride_1_out = 0;
  Py_ssize_t __pyx_bshape_0_out = 0;
  Py_ssize_t __pyx_bshape_1_out = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  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;
  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;
  long __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  long __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  long __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  long __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;
  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;
  __pyx_t_5numpy_float64_t __pyx_t_45;
  __pyx_t_5numpy_float64_t __pyx_t_46;
  Py_ssize_t __pyx_t_47;
  Py_ssize_t __pyx_t_48;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("group_var");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_counts = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_nobs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_sumx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_sumxx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_nobs.buf = NULL;
  __pyx_bstruct_sumx.buf = NULL;
  __pyx_bstruct_sumxx.buf = NULL;
  __pyx_bstruct_out.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_labels.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_out, (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_bstride_0_out = __pyx_bstruct_out.strides[0]; __pyx_bstride_1_out = __pyx_bstruct_out.strides[1];
  __pyx_bshape_0_out = __pyx_bstruct_out.shape[0]; __pyx_bshape_1_out = __pyx_bstruct_out.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
  __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
  __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];

  /* "/Users/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(((PyObject *)__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_bstruct_nobs);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_nobs, (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_bstruct_nobs, (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_bstride_0_nobs = __pyx_bstruct_nobs.strides[0]; __pyx_bstride_1_nobs = __pyx_bstruct_nobs.strides[1];
    __pyx_bshape_0_nobs = __pyx_bstruct_nobs.shape[0]; __pyx_bshape_1_nobs = __pyx_bstruct_nobs.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_DECREF(((PyObject *)__pyx_v_nobs));
  __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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(((PyObject *)__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_bstruct_sumx);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_sumx, (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_bstruct_sumx, (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_bstride_0_sumx = __pyx_bstruct_sumx.strides[0]; __pyx_bstride_1_sumx = __pyx_bstruct_sumx.strides[1];
    __pyx_bshape_0_sumx = __pyx_bstruct_sumx.shape[0]; __pyx_bshape_1_sumx = __pyx_bstruct_sumx.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_DECREF(((PyObject *)__pyx_v_sumx));
  __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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(((PyObject *)__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_bstruct_sumxx);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_sumxx, (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_bstruct_sumxx, (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_bstride_0_sumxx = __pyx_bstruct_sumxx.strides[0]; __pyx_bstride_1_sumxx = __pyx_bstruct_sumxx.strides[1];
    __pyx_bshape_0_sumxx = __pyx_bstruct_sumxx.shape[0]; __pyx_bshape_1_sumxx = __pyx_bstruct_sumxx.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_DECREF(((PyObject *)__pyx_v_sumxx));
  __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (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_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_10 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_N = __pyx_t_9;
    __pyx_v_K = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_11, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_10 == (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_3 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (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;
    if (__Pyx_EndUnpack(__pyx_t_11, 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_N = __pyx_t_10;
    __pyx_v_K = __pyx_t_9;
  }

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":343
 *     N, K = (<object> values).shape
 * 
 *     if K > 1:             # <<<<<<<<<<<<<<
 *         for i in range(N):
 * 
 */
  __pyx_t_12 = (__pyx_v_K > 1);
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":344
 * 
 *     if K > 1:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 * 
 *             lab = labels[i]
 */
    __pyx_t_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":346
 *         for i in range(N):
 * 
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":347
 * 
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_12 = (__pyx_v_lab < 0);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":348
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":350
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 * 
 *             for j in range(K):
 */
      __pyx_t_14 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts) += 1;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":352
 *             counts[lab] += 1
 * 
 *             for j in range(K):             # <<<<<<<<<<<<<<
 *                 val = values[i, j]
 * 
 */
      __pyx_t_15 = __pyx_v_K;
      for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
        __pyx_v_j = __pyx_t_16;

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":353
 * 
 *             for j in range(K):
 *                 val = values[i, j]             # <<<<<<<<<<<<<<
 * 
 *                 # not nan
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_18 = __pyx_v_j;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":356
 * 
 *                 # not nan
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val
 */
        __pyx_t_12 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_12) {

          /* "/Users/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_19 = __pyx_v_lab;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_19, __pyx_bstride_0_nobs, __pyx_t_20, __pyx_bstride_1_nobs) += 1;

          /* "/Users/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_21 = __pyx_v_lab;
          __pyx_t_22 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_21, __pyx_bstride_0_sumx, __pyx_t_22, __pyx_bstride_1_sumx) += __pyx_v_val;

          /* "/Users/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_23 = __pyx_v_lab;
          __pyx_t_24 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumxx.buf, __pyx_t_23, __pyx_bstride_0_sumxx, __pyx_t_24, __pyx_bstride_1_sumxx) += (__pyx_v_val * __pyx_v_val);
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      __pyx_L7_continue:;
    }
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":361
 *                     sumxx[lab, j] += val * val
 *     else:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 * 
 *             lab = labels[i]
 */
    __pyx_t_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":363
 *         for i in range(N):
 * 
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_15, __pyx_bstride_0_labels));

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":364
 * 
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_12 = (__pyx_v_lab < 0);
      if (__pyx_t_12) {

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":365
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L13_continue;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":367
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             val = values[i, 0]
 *             # not nan
 */
      __pyx_t_16 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_16, __pyx_bstride_0_counts) += 1;

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":368
 * 
 *             counts[lab] += 1
 *             val = values[i, 0]             # <<<<<<<<<<<<<<
 *             # not nan
 *             if val == val:
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_t_26 = 0;
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values));

      /* "/Users/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_12 = (__pyx_v_val == __pyx_v_val);
      if (__pyx_t_12) {

        /* "/Users/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_27 = __pyx_v_lab;
        __pyx_t_28 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_27, __pyx_bstride_0_nobs, __pyx_t_28, __pyx_bstride_1_nobs) += 1;

        /* "/Users/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_29 = __pyx_v_lab;
        __pyx_t_30 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_29, __pyx_bstride_0_sumx, __pyx_t_30, __pyx_bstride_1_sumx) += __pyx_v_val;

        /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":373
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val
 *                 sumxx[lab, 0] += val * val             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_31 = __pyx_v_lab;
        __pyx_t_32 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumxx.buf, __pyx_t_31, __pyx_bstride_0_sumxx, __pyx_t_32, __pyx_bstride_1_sumxx) += (__pyx_v_val * __pyx_v_val);
        goto __pyx_L16;
      }
      __pyx_L16:;
      __pyx_L13_continue:;
    }
  }
  __pyx_L6:;

  /* "/Users/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_1 = ((PyObject *)__pyx_v_counts);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "/Users/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_33 = __pyx_v_K;
    for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) {
      __pyx_v_j = __pyx_t_34;

      /* "/Users/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_35 = __pyx_v_i;
      __pyx_t_36 = __pyx_v_j;
      __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_nobs.buf, __pyx_t_35, __pyx_bstride_0_nobs, __pyx_t_36, __pyx_bstride_1_nobs));

      /* "/Users/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_12 = (__pyx_v_ct < 2.0);
      if (__pyx_t_12) {

        /* "/Users/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_37 = __pyx_v_i;
        __pyx_t_38 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_37, __pyx_bstride_0_out, __pyx_t_38, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_nan;
        goto __pyx_L21;
      }
      /*else*/ {

        /* "/Users/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_39 = __pyx_v_i;
        __pyx_t_40 = __pyx_v_j;
        __pyx_t_41 = __pyx_v_i;
        __pyx_t_42 = __pyx_v_j;
        __pyx_t_43 = __pyx_v_i;
        __pyx_t_44 = __pyx_v_j;
        __pyx_t_45 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumxx.buf, __pyx_t_39, __pyx_bstride_0_sumxx, __pyx_t_40, __pyx_bstride_1_sumxx))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_41, __pyx_bstride_0_sumx, __pyx_t_42, __pyx_bstride_1_sumx)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sumx.buf, __pyx_t_43, __pyx_bstride_0_sumx, __pyx_t_44, __pyx_bstride_1_sumx))));

        /* "/Users/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_46 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct);
        if (unlikely(__pyx_t_46 == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/Users/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_47 = __pyx_v_i;
        __pyx_t_48 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_47, __pyx_bstride_0_out, __pyx_t_48, __pyx_bstride_1_out) = (__pyx_t_45 / __pyx_t_46);
      }
      __pyx_L21:;
    }
  }

  __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_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumx);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nobs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumxx);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_var");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumx);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nobs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sumxx);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_nobs);
  __Pyx_DECREF((PyObject *)__pyx_v_sumx);
  __Pyx_DECREF((PyObject *)__pyx_v_sumxx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_35group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_35group_count = {__Pyx_NAMESTR("group_count"), (PyCFunction)__pyx_pf_6pandas_8_tseries_35group_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_35group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_int32_t __pyx_t_13;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__size,0};
  __Pyx_RefNannySetupContext("group_count");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_size = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __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 = 390; __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_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __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 = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 390; __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 = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.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_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_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;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_12, __pyx_bstride_0_values));
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_bshape_0_counts;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_13, __pyx_bstride_0_counts) += 1;
  }

  /* "/Users/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_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_bstruct_counts);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_count");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_36lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_36lookup_values = {__Pyx_NAMESTR("lookup_values"), (PyCFunction)__pyx_pf_6pandas_8_tseries_36lookup_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_36lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_mapping = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mapping,0};
  __Pyx_RefNannySetupContext("lookup_values");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mapping = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __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[5]; __pyx_lineno = 399; __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 = 399; __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 = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 399; __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__O)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_2; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_t_5); if (!__pyx_t_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_1, 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_1); __pyx_t_1 = 0;
  }

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 402; __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[5]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1, ((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_1); __pyx_t_1 = 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_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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.lookup_values");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_37reduce_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_37reduce_mean = {__Pyx_NAMESTR("reduce_mean"), (PyCFunction)__pyx_pf_6pandas_8_tseries_37reduce_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_37reduce_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;
  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;
  __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;
  Py_buffer __pyx_bstruct_buckets;
  Py_ssize_t __pyx_bstride_0_buckets = 0;
  Py_ssize_t __pyx_bshape_0_buckets = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_indices;
  Py_ssize_t __pyx_bstride_0_indices = 0;
  Py_ssize_t __pyx_bshape_0_indices = 0;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indices,&__pyx_n_s__buckets,&__pyx_n_s__values,&__pyx_n_s__inclusive,0};
  __Pyx_RefNannySetupContext("reduce_mean");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[3] = __pyx_k_9;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_inclusive = __pyx_k_9;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_inclusive = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
      __pyx_v_buckets = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_indices = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_next_bound = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_indices.buf = NULL;
  __pyx_bstruct_buckets.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indices, (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_bstride_0_indices = __pyx_bstruct_indices.strides[0];
  __pyx_bshape_0_indices = __pyx_bstruct_indices.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_buckets, (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_bstride_0_buckets = __pyx_bstruct_buckets.strides[0];
  __pyx_bshape_0_buckets = __pyx_bstruct_buckets.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":415
 * 
 * 
 *     nbuckets = len(buckets)             # <<<<<<<<<<<<<<
 *     nvalues = len(indices)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_buckets);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nbuckets = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":416
 * 
 *     nbuckets = len(buckets)
 *     nvalues = len(indices)             # <<<<<<<<<<<<<<
 * 
 *     assert(len(values) == len(indices))
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indices);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nvalues = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_indices);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!(__pyx_t_2 == __pyx_t_3))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __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[5]; __pyx_lineno = 420; __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_nbuckets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __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[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[5]; __pyx_lineno = 420; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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 = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_output, (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_bstruct_output, (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_bstride_0_output = __pyx_bstruct_output.strides[0];
    __pyx_bshape_0_output = __pyx_bstruct_output.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_DECREF(((PyObject *)__pyx_v_output));
  __pyx_v_output = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_t_6, ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/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;

  /* "/Users/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_3 = __pyx_v_nbuckets;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "/Users/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_2 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_buckets;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_buckets)) __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_bstruct_buckets.buf, __pyx_t_2, __pyx_bstride_0_buckets);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_next_bound);
    __pyx_v_next_bound = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/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;

    /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_indices;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_indices)) __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_bstruct_indices.buf, __pyx_t_13, __pyx_bstride_0_indices);
          __Pyx_INCREF((PyObject*)__pyx_t_5);
          __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_next_bound, Py_LE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); 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_1); __pyx_t_1 = 0;
          __pyx_t_15 = __pyx_t_14;
        } else {
          __pyx_t_15 = __pyx_t_12;
        }
        if (!__pyx_t_15) break;

        /* "/Users/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_bshape_0_values;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values));

        /* "/Users/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) {

          /* "/Users/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);

          /* "/Users/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_L11;
        }
        __pyx_L11:;

        /* "/Users/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_L8;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_indices;
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_indices)) __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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_indices.buf, __pyx_t_17, __pyx_bstride_0_indices);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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;

        /* "/Users/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_bshape_0_values;
          if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_18, __pyx_bstride_0_values));

        /* "/Users/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) {

          /* "/Users/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);

          /* "/Users/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_L14;
        }
        __pyx_L14:;

        /* "/Users/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_L8:;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_19, __pyx_bstride_0_output) = (__pyx_v_the_sum / __pyx_v_nobs);
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":449
 * 
 *         if j >= nvalues:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      goto __pyx_L7_break;
      goto __pyx_L16;
    }
    __pyx_L16:;
  }
  __pyx_L7_break:;

  /* "/Users/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_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_bstruct_buckets);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indices);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.reduce_mean");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_buckets);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indices);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_output);
  __Pyx_DECREF(__pyx_v_next_bound);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_38_bucket_locs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_38_bucket_locs = {__Pyx_NAMESTR("_bucket_locs"), (PyCFunction)__pyx_pf_6pandas_8_tseries_38_bucket_locs, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_38_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;
  PyObject *__pyx_v_locs;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__buckets,&__pyx_n_s__inclusive,0};
  __Pyx_RefNannySetupContext("_bucket_locs");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_10;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_inclusive = __pyx_k_10;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3:
      __pyx_v_inclusive = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_buckets = PyTuple_GET_ITEM(__pyx_args, 1);
      __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_locs = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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) {

    /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_DECREF(__pyx_v_locs);
    __pyx_v_locs = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_DECREF(__pyx_v_locs);
    __pyx_v_locs = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L6:;

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_39count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_39count_level_1d = {__Pyx_NAMESTR("count_level_1d"), (PyCFunction)__pyx_pf_6pandas_8_tseries_39count_level_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_39count_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0};
  __Pyx_RefNannySetupContext("count_level_1d");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  __pyx_bstruct_labels.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
  __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_counts);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.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_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Users/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_4 = ((PyObject *)__pyx_v_mask);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_n = __pyx_t_10;

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_mask;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_mask)) __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_bstruct_mask.buf, __pyx_t_11, __pyx_bstride_0_mask));
    if (__pyx_t_12) {

      /* "/Users/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_bshape_0_labels;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels));
      __pyx_t_6 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_bshape_0_counts;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts) += 1;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

  /* "/Users/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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.count_level_1d");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_40count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_40count_level_2d = {__Pyx_NAMESTR("count_level_2d"), (PyCFunction)__pyx_pf_6pandas_8_tseries_40count_level_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_40count_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;
  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;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bstride_1_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_ssize_t __pyx_bshape_1_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_uint8_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  __pyx_t_5numpy_int32_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0};
  __Pyx_RefNannySetupContext("count_level_2d");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  __pyx_bstruct_labels.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
  __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_n = __pyx_t_4;
    __pyx_v_k = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_n = __pyx_t_5;
    __pyx_v_k = __pyx_t_4;
  }

  /* "/Users/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_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 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(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 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[5]; __pyx_lineno = 484; __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__i8)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); 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_6)); __pyx_t_6 = 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_7 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_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_bstride_0_counts = __pyx_bstruct_counts.strides[0]; __pyx_bstride_1_counts = __pyx_bstruct_counts.strides[1];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0]; __pyx_bshape_1_counts = __pyx_bstruct_counts.shape[1];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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_4 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {

    /* "/Users/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_5 = __pyx_v_k;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) {

      /* "/Users/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_12 = __pyx_v_i;
      __pyx_t_13 = __pyx_v_j;
      __pyx_t_8 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_bshape_0_mask;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_mask)) __pyx_t_8 = 0;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_bshape_1_mask;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 1;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_1_mask)) __pyx_t_8 = 1;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_14 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask, __pyx_t_13, __pyx_bstride_1_mask));
      if (__pyx_t_14) {

        /* "/Users/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_15 = __pyx_v_i;
        __pyx_t_8 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_bshape_0_labels;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_15, __pyx_bstride_0_labels));
        __pyx_t_17 = __pyx_v_j;
        __pyx_t_8 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_bshape_0_counts;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
        if (__pyx_t_17 < 0) {
          __pyx_t_17 += __pyx_bshape_1_counts;
          if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 1;
        } else if (unlikely(__pyx_t_17 >= __pyx_bshape_1_counts)) __pyx_t_8 = 1;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_counts.buf, __pyx_t_16, __pyx_bstride_0_counts, __pyx_t_17, __pyx_bstride_1_counts) += 1;
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
  }

  /* "/Users/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_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.count_level_2d");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_41duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_41duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pf_6pandas_8_tseries_41duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_41duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_take_last = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seen = 0;
  PyObject *__pyx_v_row;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__take_last,0};
  __Pyx_RefNannySetupContext("duplicated");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_11;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_take_last = __pyx_k_11;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_take_last = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_values = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_row = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  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;}

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":499
 *         object row
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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) {

    /* "/Users/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--) {

      /* "/Users/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_DECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/Users/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:
 */
      if (unlikely(__pyx_v_seen == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __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) {

        /* "/Users/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_bshape_0_result;
          if (unlikely(__pyx_t_2 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_2, __pyx_bstride_0_result) = 1;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/Users/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;}

        /* "/Users/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_bshape_0_result;
          if (unlikely(__pyx_t_10 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result) = 0;
      }
      __pyx_L9:;
    }
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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++) {

      /* "/Users/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_DECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/Users/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:
 */
      if (unlikely(__pyx_v_seen == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __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) {

        /* "/Users/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_bshape_0_result;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_12, __pyx_bstride_0_result) = 1;
        goto __pyx_L12;
      }
      /*else*/ {

        /* "/Users/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;}

        /* "/Users/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_bshape_0_result;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_result)) __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_bstruct_result.buf, __pyx_t_13, __pyx_bstride_0_result) = 0;
      }
      __pyx_L12:;
    }
  }
  __pyx_L6:;

  /* "/Users/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(((PyObject *)__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_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.duplicated");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_seen);
  __Pyx_DECREF(__pyx_v_row);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_42generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_42generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pf_6pandas_8_tseries_42generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_42generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_labels = 0;
  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;
  PyObject *__pyx_v_ends;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_starts;
  Py_ssize_t __pyx_bstride_0_starts = 0;
  Py_ssize_t __pyx_bshape_0_starts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__labels,&__pyx_n_s__ngroups,0};
  __Pyx_RefNannySetupContext("generate_slices");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_starts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_ends = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_starts.buf = NULL;
  __pyx_bstruct_labels.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
  __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];

  /* "/Users/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 *)__pyx_v_labels);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __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 = 530; __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_ngroups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __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 = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 530; __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 = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_starts);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_starts, (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_bstruct_starts, (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_bstride_0_starts = __pyx_bstruct_starts.strides[0];
    __pyx_bshape_0_starts = __pyx_bstruct_starts.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_DECREF(((PyObject *)__pyx_v_starts));
  __pyx_v_starts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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;
  __Pyx_DECREF(__pyx_v_ends);
  __pyx_v_ends = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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_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;

    /* "/Users/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);

    /* "/Users/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_bshape_0_labels;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_12, __pyx_bstride_0_labels));

    /* "/Users/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_bshape_0_labels;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_14, __pyx_bstride_0_labels)));
      __pyx_t_16 = __pyx_t_15;
    } else {
      __pyx_t_16 = __pyx_t_13;
    }
    if (__pyx_t_16) {

      /* "/Users/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_bshape_0_starts;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_starts)) __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_bstruct_starts.buf, __pyx_t_17, __pyx_bstride_0_starts) = __pyx_v_start;

      /* "/Users/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;

      /* "/Users/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);

      /* "/Users/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_L8;
    }
    __pyx_L8:;
  }

  /* "/Users/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(((PyObject *)__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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_starts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.generate_slices");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_starts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_starts);
  __Pyx_DECREF(__pyx_v_ends);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_43ts_upsample_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_43ts_upsample_generic[] = "\n    put something here\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_43ts_upsample_generic = {__Pyx_NAMESTR("ts_upsample_generic"), (PyCFunction)__pyx_pf_6pandas_8_tseries_43ts_upsample_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_43ts_upsample_generic)};
static PyObject *__pyx_pf_6pandas_8_tseries_43ts_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;
  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;
  PyObject *__pyx_v_next_bound;
  __pyx_t_5numpy_float64_t __pyx_v_the_sum;
  __pyx_t_5numpy_float64_t __pyx_v_nobs;
  Py_buffer __pyx_bstruct_buckets;
  Py_ssize_t __pyx_bstride_0_buckets = 0;
  Py_ssize_t __pyx_bshape_0_buckets = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_indices;
  Py_ssize_t __pyx_bstride_0_indices = 0;
  Py_ssize_t __pyx_bshape_0_indices = 0;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  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;
  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};
  __Pyx_RefNannySetupContext("ts_upsample_generic");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = __pyx_k_12;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_inclusive = __pyx_k_12;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  5:
      __pyx_v_inclusive = PyTuple_GET_ITEM(__pyx_args, 4);
      case  4:
      __pyx_v_aggfunc = PyTuple_GET_ITEM(__pyx_args, 3);
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
      __pyx_v_buckets = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_indices = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_next_bound = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_indices.buf = NULL;
  __pyx_bstruct_buckets.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indices, (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_bstride_0_indices = __pyx_bstruct_indices.strides[0];
  __pyx_bshape_0_indices = __pyx_bstruct_indices.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_buckets, (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_bstride_0_buckets = __pyx_bstruct_buckets.strides[0];
  __pyx_bshape_0_buckets = __pyx_bstruct_buckets.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":655
 *         float64_t the_sum, val, nobs
 * 
 *     nbuckets = len(buckets)             # <<<<<<<<<<<<<<
 *     nvalues = len(indices)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_buckets);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nbuckets = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":656
 * 
 *     nbuckets = len(buckets)
 *     nvalues = len(indices)             # <<<<<<<<<<<<<<
 * 
 *     assert(len(values) == len(indices))
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indices);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nvalues = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_indices);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!(__pyx_t_2 == __pyx_t_3))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __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[5]; __pyx_lineno = 660; __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_nbuckets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __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[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[5]; __pyx_lineno = 660; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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 = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_output, (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_bstruct_output, (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_bstride_0_output = __pyx_bstruct_output.strides[0];
    __pyx_bshape_0_output = __pyx_bstruct_output.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_DECREF(((PyObject *)__pyx_v_output));
  __pyx_v_output = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_t_6, ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/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;

  /* "/Users/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_3 = __pyx_v_nbuckets;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "/Users/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_2 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_buckets;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_buckets)) __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_bstruct_buckets.buf, __pyx_t_2, __pyx_bstride_0_buckets);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_next_bound);
    __pyx_v_next_bound = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":667
 *         next_bound = buckets[i]
 *         the_sum = 0
 *         nobs = 0             # <<<<<<<<<<<<<<
 * 
 *         jstart = j
 */
    __pyx_v_nobs = 0.0;

    /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_indices;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_indices)) __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_bstruct_indices.buf, __pyx_t_13, __pyx_bstride_0_indices);
          __Pyx_INCREF((PyObject*)__pyx_t_5);
          __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_next_bound, Py_LE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); 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_1); __pyx_t_1 = 0;
          __pyx_t_15 = __pyx_t_14;
        } else {
          __pyx_t_15 = __pyx_t_12;
        }
        if (!__pyx_t_15) break;

        /* "/Users/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_L8;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_indices;
            if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_indices)) __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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_indices.buf, __pyx_t_16, __pyx_bstride_0_indices);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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;

        /* "/Users/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_L8:;

    /* "/Users/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) {

      /* "/Users/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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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_aggfunc, ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 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_bshape_0_output;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_18, __pyx_bstride_0_output) = __pyx_t_17;
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/groupby.pyx":681
 * 
 *         if j >= nvalues:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      goto __pyx_L7_break;
      goto __pyx_L14;
    }
    __pyx_L14:;
  }
  __pyx_L7_break:;

  /* "/Users/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_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_bstruct_buckets);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indices);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ts_upsample_generic");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_buckets);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indices);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_output);
  __Pyx_DECREF(__pyx_v_next_bound);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_44kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_44kth_smallest = {__Pyx_NAMESTR("kth_smallest"), (PyCFunction)__pyx_pf_6pandas_8_tseries_44kth_smallest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_44kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_a = 0;
  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;
  Py_buffer __pyx_bstruct_a;
  Py_ssize_t __pyx_bstride_0_a = 0;
  Py_ssize_t __pyx_bshape_0_a = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__k,0};
  __Pyx_RefNannySetupContext("kth_smallest");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_a = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_k = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_a.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_a, (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_bstride_0_a = __pyx_bstruct_a.strides[0];
  __pyx_bshape_0_a = __pyx_bstruct_a.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":33
 *         double_t x, t
 * 
 *     n = len(a)             # <<<<<<<<<<<<<<
 * 
 *     l = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":35
 *     n = len(a)
 * 
 *     l = 0             # <<<<<<<<<<<<<<
 *     m = n-1
 *     while (l<m):
 */
  __pyx_v_l = 0;

  /* "/Users/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);

  /* "/Users/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_3 = (__pyx_v_l < __pyx_v_m);
    if (!__pyx_t_3) break;

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":38
 *     m = n-1
 *     while (l<m):
 *         x = a[k]             # <<<<<<<<<<<<<<
 *         i = l
 *         j = m
 */
    __pyx_t_2 = __pyx_v_k;
    __pyx_t_4 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_a;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__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_bstruct_a.buf, __pyx_t_2, __pyx_bstride_0_a));

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":39
 *     while (l<m):
 *         x = a[k]
 *         i = l             # <<<<<<<<<<<<<<
 *         j = m
 * 
 */
    __pyx_v_i = __pyx_v_l;

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":40
 *         x = a[k]
 *         i = l
 *         j = m             # <<<<<<<<<<<<<<
 * 
 *         while 1:
 */
    __pyx_v_j = __pyx_v_m;

    /* "/Users/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;

      /* "/Users/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_5 = __pyx_v_i;
        __pyx_t_4 = -1;
        if (__pyx_t_5 < 0) {
          __pyx_t_5 += __pyx_bshape_0_a;
          if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0;
        } else if (unlikely(__pyx_t_5 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
        if (unlikely(__pyx_t_4 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_4);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_a.buf, __pyx_t_5, __pyx_bstride_0_a)) < __pyx_v_x);
        if (!__pyx_t_3) break;
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "/Users/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_6 = __pyx_v_j;
        __pyx_t_4 = -1;
        if (__pyx_t_6 < 0) {
          __pyx_t_6 += __pyx_bshape_0_a;
          if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0;
        } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
        if (unlikely(__pyx_t_4 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_4);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = (__pyx_v_x < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_a.buf, __pyx_t_6, __pyx_bstride_0_a)));
        if (!__pyx_t_3) break;
        __pyx_v_j = (__pyx_v_j - 1);
      }

      /* "/Users/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_3 = (__pyx_v_i <= __pyx_v_j);
      if (__pyx_t_3) {

        /* "/Users/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_7 = __pyx_v_i;
        __pyx_t_4 = -1;
        if (__pyx_t_7 < 0) {
          __pyx_t_7 += __pyx_bshape_0_a;
          if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
        } else if (unlikely(__pyx_t_7 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
        if (unlikely(__pyx_t_4 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_4);
          {__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_bstruct_a.buf, __pyx_t_7, __pyx_bstride_0_a));

        /* "/Users/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_8 = __pyx_v_j;
        __pyx_t_4 = -1;
        if (__pyx_t_8 < 0) {
          __pyx_t_8 += __pyx_bshape_0_a;
          if (unlikely(__pyx_t_8 < 0)) __pyx_t_4 = 0;
        } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
        if (unlikely(__pyx_t_4 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_4);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_9 = __pyx_v_i;
        __pyx_t_4 = -1;
        if (__pyx_t_9 < 0) {
          __pyx_t_9 += __pyx_bshape_0_a;
          if (unlikely(__pyx_t_9 < 0)) __pyx_t_4 = 0;
        } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
        if (unlikely(__pyx_t_4 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_4);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_a.buf, __pyx_t_9, __pyx_bstride_0_a) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_a.buf, __pyx_t_8, __pyx_bstride_0_a));

        /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":48
 *                 t = a[i]
 *                 a[i] = a[j]
 *                 a[j] = t             # <<<<<<<<<<<<<<
 *                 i += 1; j -= 1
 * 
 */
        __pyx_t_10 = __pyx_v_j;
        __pyx_t_4 = -1;
        if (__pyx_t_10 < 0) {
          __pyx_t_10 += __pyx_bshape_0_a;
          if (unlikely(__pyx_t_10 < 0)) __pyx_t_4 = 0;
        } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
        if (unlikely(__pyx_t_4 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_4);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_a.buf, __pyx_t_10, __pyx_bstride_0_a) = __pyx_v_t;

        /* "/Users/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_L14;
      }
      __pyx_L14:;

      /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":51
 *                 i += 1; j -= 1
 * 
 *             if i > j: break             # <<<<<<<<<<<<<<
 * 
 *         if j < k: l = i
 */
      __pyx_t_3 = (__pyx_v_i > __pyx_v_j);
      if (__pyx_t_3) {
        goto __pyx_L9_break;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L9_break:;

    /* "/Users/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_3 = (__pyx_v_j < __pyx_v_k);
    if (__pyx_t_3) {
      __pyx_v_l = __pyx_v_i;
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":54
 * 
 *         if j < k: l = i
 *         if k < i: m = j             # <<<<<<<<<<<<<<
 *     return a[k]
 * 
 */
    __pyx_t_3 = (__pyx_v_k < __pyx_v_i);
    if (__pyx_t_3) {
      __pyx_v_m = __pyx_v_j;
      goto __pyx_L17;
    }
    __pyx_L17:;
  }

  /* "/Users/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_11 = __pyx_v_k;
  __pyx_t_4 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_bshape_0_a;
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_a)) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_a.buf, __pyx_t_11, __pyx_bstride_0_a))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 55; __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_bstruct_a);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.kth_smallest");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_a);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/moments.pyx":58
 * 
 * 
 * def median(ndarray arr):             # <<<<<<<<<<<<<<
 *     '''
 *     A faster median
 */

static PyObject *__pyx_pf_6pandas_8_tseries_45median(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static char __pyx_doc_6pandas_8_tseries_45median[] = "\n    A faster median\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_45median = {__Pyx_NAMESTR("median"), (PyCFunction)__pyx_pf_6pandas_8_tseries_45median, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_45median)};
static PyObject *__pyx_pf_6pandas_8_tseries_45median(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("median");
  __pyx_self = __pyx_self;
  __Pyx_INCREF((PyObject *)__pyx_v_arr);
  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;}

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":62
 *     A faster median
 *     '''
 *     cdef int n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if len(arr) == 0:
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":64
 *     cdef int n = len(arr)
 * 
 *     if len(arr) == 0:             # <<<<<<<<<<<<<<
 *         return np.NaN
 * 
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == 0);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":65
 * 
 *     if len(arr) == 0:
 *         return np.NaN             # <<<<<<<<<<<<<<
 * 
 *     arr = arr.copy()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":67
 *         return np.NaN
 * 
 *     arr = arr.copy()             # <<<<<<<<<<<<<<
 * 
 *     if n % 2:
 */
  __pyx_t_4 = PyObject_GetAttr(__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_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 67; __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[6]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_v_arr);
  __pyx_v_arr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    __Pyx_INCREF(__pyx_v_arr);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_arr);
    __Pyx_GIVEREF(__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_1, ((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_1); __pyx_t_1 = 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_L6;
  }
  /*else*/ {

    /* "/Users/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);

    /* "/Users/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);

    /* "/Users/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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_arr);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr);
    __Pyx_GIVEREF(__pyx_v_arr);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":73
 *     else:
 *         return (kth_smallest(arr, n / 2) +
 *                 kth_smallest(arr, n / 2 - 1)) / 2             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_7));
    __Pyx_INCREF(__pyx_v_arr);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_arr);
    __Pyx_GIVEREF(__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_1, ((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_1); __pyx_t_1 = 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_L6:;

  __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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._tseries.median");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_46roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_46roll_sum = {__Pyx_NAMESTR("roll_sum"), (PyCFunction)__pyx_pf_6pandas_8_tseries_46roll_sum, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_46roll_sum(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_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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_sum");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __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[6]; __pyx_lineno = 83; __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_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __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[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 83; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_7, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_9, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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);

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":107
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = __pyx_v_sum_x;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_15, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L14:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_sum");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_47roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_47roll_mean = {__Pyx_NAMESTR("roll_mean"), (PyCFunction)__pyx_pf_6pandas_8_tseries_47roll_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_47roll_mean(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_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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_mean");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __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[6]; __pyx_lineno = 126; __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[6]; __pyx_lineno = 126; __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[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 126; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":131
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_input;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_2, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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);

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":150
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = (__pyx_v_sum_x / __pyx_v_nobs);
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_15, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L14:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_mean");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_48ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_48ewma[] = "\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_48ewma = {__Pyx_NAMESTR("ewma"), (PyCFunction)__pyx_pf_6pandas_8_tseries_48ewma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_48ewma)};
static PyObject *__pyx_pf_6pandas_8_tseries_48ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  __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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  __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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__com,0};
  __Pyx_RefNannySetupContext("ewma");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_com = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __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[6]; __pyx_lineno = 181; __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[6]; __pyx_lineno = 181; __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[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 181; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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);

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":185
 * 
 *     neww = 1. / (1. + com)
 *     oldw = 1. - neww             # <<<<<<<<<<<<<<
 *     adj = oldw
 * 
 */
  __pyx_v_oldw = (1. - __pyx_v_neww);

  /* "/Users/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;

  /* "/Users/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_bshape_0_input;
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_input)) __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_bshape_0_output;
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = (__pyx_v_neww * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_bstruct_input.buf, __pyx_t_8, __pyx_bstride_0_input)));

  /* "/Users/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_2 = __pyx_v_N;
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_11, __pyx_bstride_0_input));

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_12, __pyx_bstride_0_output));

    /* "/Users/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) {

      /* "/Users/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) {

        /* "/Users/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_bshape_0_output;
          if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = ((__pyx_v_oldw * __pyx_v_prev) + (__pyx_v_neww * __pyx_v_cur));
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/Users/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_bshape_0_output;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_15, __pyx_bstride_0_output) = (__pyx_v_neww * __pyx_v_cur);
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_16, __pyx_bstride_0_output) = __pyx_v_prev;
    }
    __pyx_L8:;
  }

  /* "/Users/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_2 = __pyx_v_N;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_17, __pyx_bstride_0_input));

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_18, __pyx_bstride_0_output));
    __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_bshape_0_output;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_20, __pyx_bstride_0_output) = (__pyx_t_7 / __pyx_t_19);

    /* "/Users/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) {

      /* "/Users/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_L12;
    }
    __pyx_L12:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ewma");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_49_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_49_check_minp = {__Pyx_NAMESTR("_check_minp"), (PyCFunction)__pyx_pf_6pandas_8_tseries_49_check_minp, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_49_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_minp = 0;
  PyObject *__pyx_v_N = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__minp,&__pyx_n_s__N,0};
  __Pyx_RefNannySetupContext("_check_minp");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_minp = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_N = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_minp);

  /* "/Users/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) {

    /* "/Users/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_L6;
  }

  /* "/Users/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) {

    /* "/Users/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_L6;
  }

  /* "/Users/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) {

    /* "/Users/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);
    __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_L6;
  }
  __pyx_L6:;

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_minp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_50roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_50roll_var = {__Pyx_NAMESTR("roll_var"), (PyCFunction)__pyx_pf_6pandas_8_tseries_50roll_var, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_50roll_var(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_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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_var");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __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[6]; __pyx_lineno = 228; __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[6]; __pyx_lineno = 228; __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[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 228; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":233
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_input;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_2, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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);

        /* "/Users/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));

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_16, __pyx_bstride_0_output) = (__pyx_t_14 / __pyx_t_15);
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_17, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L14:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_var");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_51roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_51roll_skew = {__Pyx_NAMESTR("roll_skew"), (PyCFunction)__pyx_pf_6pandas_8_tseries_51roll_skew, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_51roll_skew(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_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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_skew");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __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[6]; __pyx_lineno = 274; __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[6]; __pyx_lineno = 274; __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[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 274; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":282
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_input;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_2, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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);

        /* "/Users/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));

        /* "/Users/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));

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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));

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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;}
      }

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_16, __pyx_bstride_0_output) = (__pyx_t_14 / __pyx_t_15);
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_17, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L14:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_skew");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_52roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_52roll_kurt = {__Pyx_NAMESTR("roll_kurt"), (PyCFunction)__pyx_pf_6pandas_8_tseries_52roll_kurt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_52roll_kurt(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_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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_kurt");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __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[6]; __pyx_lineno = 336; __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[6]; __pyx_lineno = 336; __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[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 336; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":344
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_input;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_2, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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));

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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);

        /* "/Users/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));

        /* "/Users/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));

        /* "/Users/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));

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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));

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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);

      /* "/Users/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));

      /* "/Users/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)));

      /* "/Users/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);

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_16, __pyx_bstride_0_output) = __pyx_v_K;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_17, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L14:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_kurt");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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_RefNannySetupContext("_roll_skiplist_op");
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_input.buf = NULL;
  __pyx_bstruct_output.buf = NULL;

  /* "/Users/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_bstruct_input, (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_bstruct_input.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_input = __pyx_bstruct_input.strides[0];
      __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];
    }
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_arg));
  __pyx_v_input = ((PyArrayObject *)__pyx_v_arg);

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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(((PyObject *)__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_DECREF(((PyObject *)__pyx_v_skiplist));
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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(((PyObject *)__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;

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_1, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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;

        /* "/Users/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:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":435
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist.insert(val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/Users/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:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = __pyx_v_op(((PyObject *)__pyx_v_skiplist), __pyx_v_nobs, __pyx_v_minp);
  }

  /* "/Users/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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries._roll_skiplist_op");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_input);
  __Pyx_DECREF((PyObject *)__pyx_v_skiplist);
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_53roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_53roll_median_c = {__Pyx_NAMESTR("roll_median_c"), (PyCFunction)__pyx_pf_6pandas_8_tseries_53roll_median_c, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_53roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arg = 0;
  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;
  Py_buffer __pyx_bstruct_arg;
  Py_ssize_t __pyx_bstride_0_arg = 0;
  Py_ssize_t __pyx_bshape_0_arg = 0;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arg,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_median_c");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_arg = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_arg.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arg, (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_bstride_0_arg = __pyx_bstruct_arg.strides[0];
  __pyx_bshape_0_arg = __pyx_bstruct_arg.shape[0];

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_arg);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __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[6]; __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_t_1 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __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[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 453; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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);

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":460
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = arg[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_arg;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_arg)) __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_bstruct_arg.buf, __pyx_t_2, __pyx_bstride_0_arg));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_arg;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_arg)) __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_bstruct_arg.buf, __pyx_t_12, __pyx_bstride_0_arg));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_arg;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_arg)) __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_bstruct_arg.buf, __pyx_t_13, __pyx_bstride_0_arg));

      /* "/Users/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) {

        /* "/Users/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);

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":480
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist_insert(sl, val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/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_L15;
      }
      /*else*/ {

        /* "/Users/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_L15:;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_L14:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = __pyx_v_res;
  }

  /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":495
 *         output[i] = res
 * 
 *     skiplist_destroy(sl)             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
  skiplist_destroy(__pyx_v_sl);

  /* "/Users/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_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_bstruct_arg);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_median_c");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arg);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_54roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_54roll_median_cython[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_54roll_median_cython = {__Pyx_NAMESTR("roll_median_cython"), (PyCFunction)__pyx_pf_6pandas_8_tseries_54roll_median_cython, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_54roll_median_cython)};
static PyObject *__pyx_pf_6pandas_8_tseries_54roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_median_cython");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_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;}

  /* "/Users/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 = ((PyObject *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries__roll_skiplist_op(((PyArrayObject *)__pyx_t_1), __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_8_tseries__get_median); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.roll_median_cython");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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;
  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;
  __Pyx_RefNannySetupContext("_get_median");

  /* "/Users/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);

  /* "/Users/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) {

    /* "/Users/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);

    /* "/Users/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) {

      /* "/Users/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*/ {

      /* "/Users/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);

      /* "/Users/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*/ {

    /* "/Users/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_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_skiplist);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_55roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_55roll_max[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_55roll_max = {__Pyx_NAMESTR("roll_max"), (PyCFunction)__pyx_pf_6pandas_8_tseries_55roll_max, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_55roll_max)};
static PyObject *__pyx_pf_6pandas_8_tseries_55roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_max");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_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;}

  /* "/Users/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 = ((PyObject *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries__roll_skiplist_op(((PyArrayObject *)__pyx_t_1), __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_8_tseries__get_max); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.roll_max");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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;
  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;
  __Pyx_RefNannySetupContext("_get_max");

  /* "/Users/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) {

    /* "/Users/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(((PyObject *)__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*/ {

    /* "/Users/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_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_56roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_56roll_min[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_56roll_min = {__Pyx_NAMESTR("roll_min"), (PyCFunction)__pyx_pf_6pandas_8_tseries_56roll_min, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_56roll_min)};
static PyObject *__pyx_pf_6pandas_8_tseries_56roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  __Pyx_RefNannySetupContext("roll_min");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_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;}

  /* "/Users/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 = ((PyObject *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries__roll_skiplist_op(((PyArrayObject *)__pyx_t_1), __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_8_tseries__get_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.roll_min");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_double_t __pyx_t_4;
  __Pyx_RefNannySetupContext("_get_min");

  /* "/Users/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) {

    /* "/Users/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*/ {

    /* "/Users/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_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_57roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_57roll_quantile[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_57roll_quantile = {__Pyx_NAMESTR("roll_quantile"), (PyCFunction)__pyx_pf_6pandas_8_tseries_57roll_quantile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_57roll_quantile)};
static PyObject *__pyx_pf_6pandas_8_tseries_57roll_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;
  double __pyx_v_val;
  double __pyx_v_prev;
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_skiplist;
  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;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__quantile,0};
  __Pyx_RefNannySetupContext("roll_quantile");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __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[6]; __pyx_lineno = 554; __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[6]; __pyx_lineno = 554; __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[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[6]; __pyx_lineno = 554; __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 *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_IndexableSkiplist)), ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_skiplist));
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 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;

  /* "/Users/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++) {

    /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":561
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_input;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_2, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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);

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_bshape_0_output;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_10, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_input;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_12, __pyx_bstride_0_input));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_input;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_input)) __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_bstruct_input.buf, __pyx_t_13, __pyx_bstride_0_input));

      /* "/Users/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) {

        /* "/Users/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;

        /* "/Users/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_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/moments.pyx":581
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist.insert(val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/Users/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_L13;
    }
    __pyx_L13:;

    /* "/Users/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) {

      /* "/Users/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(((PyObject *)__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_DECREF(__pyx_v_idx);
      __pyx_v_idx = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = __pyx_t_15;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_16, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L14:;
  }

  /* "/Users/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_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_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_quantile");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_skiplist);
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_58roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_58roll_generic = {__Pyx_NAMESTR("roll_generic"), (PyCFunction)__pyx_pf_6pandas_8_tseries_58roll_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_58roll_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;
  PyArrayObject *__pyx_v_output;
  PyArrayObject *__pyx_v_counts;
  PyArrayObject *__pyx_v_bufarr;
  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;
  Py_buffer __pyx_bstruct_bufarr;
  Py_ssize_t __pyx_bstride_0_bufarr = 0;
  Py_ssize_t __pyx_bshape_0_bufarr = 0;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  Py_buffer __pyx_bstruct_input;
  Py_ssize_t __pyx_bstride_0_input = 0;
  Py_ssize_t __pyx_bshape_0_input = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("roll_generic");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_input = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_win = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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 = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF((PyObject *)__pyx_v_input);
  __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_bufarr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_output.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_bufarr.buf = NULL;
  __pyx_bstruct_input.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
  __pyx_bshape_0_input = __pyx_bstruct_input.shape[0];

  /* "/Users/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) {

    /* "/Users/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_bstruct_input);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_input, (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_bstruct_input, (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_bstride_0_input = __pyx_bstruct_input.strides[0];
      __pyx_bshape_0_input = __pyx_bstruct_input.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_L6;
  }
  __pyx_L6:;

  /* "/Users/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);

  /* "/Users/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_1 = ((PyObject *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_10 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_10;

  /* "/Users/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(((PyObject *)__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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_output);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_output, (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_bstruct_output, (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_bstride_0_output = __pyx_bstruct_output.strides[0];
    __pyx_bshape_0_output = __pyx_bstruct_output.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_DECREF(((PyObject *)__pyx_v_output));
  __pyx_v_output = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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(((PyObject *)__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(((PyObject *)__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(((PyObject *)__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_bstruct_counts);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.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_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_bufarr);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_bufarr, (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_bstruct_bufarr, (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_bstride_0_bufarr = __pyx_bstruct_bufarr.strides[0];
    __pyx_bshape_0_bufarr = __pyx_bstruct_bufarr.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_DECREF(((PyObject *)__pyx_v_bufarr));
  __pyx_v_bufarr = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "/Users/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);

  /* "/Users/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_12 = ((PyObject *)__pyx_v_input);
  __Pyx_INCREF(__pyx_t_12);
  __pyx_t_10 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_n = __pyx_t_10;

  /* "/Users/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++) {

    /* "/Users/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_bshape_0_counts;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_15 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_10, __pyx_bstride_0_counts)) >= __pyx_v_minp);
    if (__pyx_t_4) {

      /* "/Users/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(((PyObject *)__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_bshape_0_output;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_17, __pyx_bstride_0_output) = __pyx_t_16;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_18, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L9:;
  }

  /* "/Users/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++) {

    /* "/Users/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);

    /* "/Users/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);

    /* "/Users/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_bshape_0_counts;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_20, __pyx_bstride_0_counts)) >= __pyx_v_minp);
    if (__pyx_t_4) {

      /* "/Users/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(((PyObject *)__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_bshape_0_output;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_21, __pyx_bstride_0_output) = __pyx_t_16;
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_output;
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_22 >= __pyx_bshape_0_output)) __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_bstruct_output.buf, __pyx_t_22, __pyx_bstride_0_output) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L12:;
  }

  /* "/Users/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);

  /* "/Users/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_bstruct_bufarr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_generic");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_bufarr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_input);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_output);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF((PyObject *)__pyx_v_bufarr);
  __Pyx_DECREF((PyObject *)__pyx_v_input);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_59pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_59pad_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_59pad_inplace_float64 = {__Pyx_NAMESTR("pad_inplace_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_59pad_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_59pad_inplace_float64)};
static PyObject *__pyx_pf_6pandas_8_tseries_59pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_5numpy_uint8_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("pad_inplace_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_bshape_0_mask;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_mask)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_3, __pyx_bstride_0_mask));
    if (__pyx_t_5) {

      /* "/Users/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_6 = __pyx_v_i;
      __pyx_t_4 = -1;
      if (__pyx_t_6 < 0) {
        __pyx_t_6 += __pyx_bshape_0_values;
        if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_values)) __pyx_t_4 = 0;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_6, __pyx_bstride_0_values) = __pyx_v_val;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_7 = __pyx_v_i;
      __pyx_t_4 = -1;
      if (__pyx_t_7 < 0) {
        __pyx_t_7 += __pyx_bshape_0_values;
        if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_7 >= __pyx_bshape_0_values)) __pyx_t_4 = 0;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__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_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values));
    }
    __pyx_L8:;
  }

  __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_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_inplace_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_60get_pad_indexer(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/
static char __pyx_doc_6pandas_8_tseries_60get_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_60get_pad_indexer = {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_60get_pad_indexer, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_60get_pad_indexer)};
static PyObject *__pyx_pf_6pandas_8_tseries_60get_pad_indexer(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("get_pad_indexer");
  __pyx_self = __pyx_self;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0];

  /* "/Users/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 = __pyx_v_mask;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":34
 * 
 *     n = len(mask)
 *     indexer = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     idx = 0
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __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[7]; __pyx_lineno = 34; __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[7]; __pyx_lineno = 34; __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[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[7]; __pyx_lineno = 34; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":37
 * 
 *     idx = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         if not mask[i]:
 *             idx = i
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bshape_0_mask;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_mask)) __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_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask)));
    if (__pyx_t_13) {

      /* "/Users/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_L7;
    }
    __pyx_L7:;

    /* "/Users/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_bshape_0_indexer;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_indexer)) __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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer) = __pyx_v_idx;
  }

  /* "/Users/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_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_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_pad_indexer");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_61get_backfill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/
static char __pyx_doc_6pandas_8_tseries_61get_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_61get_backfill_indexer = {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_61get_backfill_indexer, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_61get_backfill_indexer)};
static PyObject *__pyx_pf_6pandas_8_tseries_61get_backfill_indexer(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  __Pyx_RefNannySetupContext("get_backfill_indexer");
  __pyx_self = __pyx_self;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0];

  /* "/Users/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 = __pyx_v_mask;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":57
 * 
 *     n = len(mask)
 *     indexer = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     idx = n - 1
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __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[7]; __pyx_lineno = 57; __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[7]; __pyx_lineno = 57; __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[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[7]; __pyx_lineno = 57; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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);

  /* "/Users/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);

  /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_mask;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_mask)) __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_bstruct_mask.buf, __pyx_t_2, __pyx_bstride_0_mask)));
    if (__pyx_t_12) {

      /* "/Users/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_L7;
    }
    __pyx_L7:;

    /* "/Users/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_bshape_0_indexer;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_indexer)) __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_bstruct_indexer.buf, __pyx_t_13, __pyx_bstride_0_indexer) = __pyx_v_idx;

    /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":65
 *             idx = i
 *         indexer[i] = idx
 *         i -= 1             # <<<<<<<<<<<<<<
 * 
 *     return indexer
 */
    __pyx_v_i = (__pyx_v_i - 1);
  }

  /* "/Users/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_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_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_backfill_indexer");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_62backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_62backfill_inplace_float64[] = "\n    mask: True if needs to be backfilled otherwise False\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_62backfill_inplace_float64 = {__Pyx_NAMESTR("backfill_inplace_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_62backfill_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_62backfill_inplace_float64)};
static PyObject *__pyx_pf_6pandas_8_tseries_62backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_5numpy_uint8_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("backfill_inplace_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":78
 *         float64_t val
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     val = NaN
 *     i = n - 1
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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;

  /* "/Users/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);

  /* "/Users/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_3 = (__pyx_v_i >= 0);
    if (!__pyx_t_3) break;

    /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":82
 *     i = n - 1
 *     while i >= 0:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             values[i] = val
 *         else:
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_bshape_0_mask;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_mask)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_2, __pyx_bstride_0_mask));
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":83
 *     while i >= 0:
 *         if mask[i]:
 *             values[i] = val             # <<<<<<<<<<<<<<
 *         else:
 *             val = values[i]
 */
      __pyx_t_6 = __pyx_v_i;
      __pyx_t_4 = -1;
      if (__pyx_t_6 < 0) {
        __pyx_t_6 += __pyx_bshape_0_values;
        if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_values)) __pyx_t_4 = 0;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_6, __pyx_bstride_0_values) = __pyx_v_val;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":85
 *             values[i] = val
 *         else:
 *             val = values[i]             # <<<<<<<<<<<<<<
 *         i -= 1
 * 
 */
      __pyx_t_7 = __pyx_v_i;
      __pyx_t_4 = -1;
      if (__pyx_t_7 < 0) {
        __pyx_t_7 += __pyx_bshape_0_values;
        if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_7 >= __pyx_bshape_0_values)) __pyx_t_4 = 0;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__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_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values));
    }
    __pyx_L8:;

    /* "/Users/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:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_inplace_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_63ordered_left_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_63ordered_left_join = {__Pyx_NAMESTR("ordered_left_join"), (PyCFunction)__pyx_pf_6pandas_8_tseries_63ordered_left_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_63ordered_left_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_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_indexer;
  PyArrayObject *__pyx_v_mask;
  PyObject *__pyx_v_val;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("ordered_left_join");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_mask = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":97
 *         object val
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     n = len(left)
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":98
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     n = len(left)
 *     k = len(right)
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":99
 *     i = 0
 *     j = 0
 *     n = len(left)             # <<<<<<<<<<<<<<
 *     k = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __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[7]; __pyx_lineno = 102; __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[7]; __pyx_lineno = 102; __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[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[7]; __pyx_lineno = 102; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ones); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __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_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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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_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_bstruct_mask);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0];
    __pyx_bshape_0_mask = __pyx_bstruct_mask.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_DECREF(((PyObject *)__pyx_v_mask));
  __pyx_v_mask = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bshape_0_left;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_left)) __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_bstruct_left.buf, __pyx_t_13, __pyx_bstride_0_left);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/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_bshape_0_right;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_right)) __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_bstruct_right.buf, __pyx_t_15, __pyx_bstride_0_right);
        __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;

      /* "/Users/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);
    }

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":112
 * 
 *         if j == k:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if val == right[j]:
 */
      goto __pyx_L7_break;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/Users/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_bshape_0_right;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_right)) __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_bstruct_right.buf, __pyx_t_18, __pyx_bstride_0_right);
    __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) {

      /* "/Users/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_bshape_0_indexer;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_indexer)) __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_bstruct_indexer.buf, __pyx_t_19, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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_bshape_0_mask;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_mask)) __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_bstruct_mask.buf, __pyx_t_20, __pyx_bstride_0_mask) = 0;
      goto __pyx_L11;
    }
    __pyx_L11:;
  }
  __pyx_L7_break:;

  /* "/Users/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(((PyObject *)__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(((PyObject *)__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_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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ordered_left_join");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_DECREF((PyObject *)__pyx_v_mask);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_64left_join_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_64left_join_2d = {__Pyx_NAMESTR("left_join_2d"), (PyCFunction)__pyx_pf_6pandas_8_tseries_64left_join_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_64left_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;
  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;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_rvalues;
  Py_ssize_t __pyx_bstride_0_rvalues = 0;
  Py_ssize_t __pyx_bstride_1_rvalues = 0;
  Py_ssize_t __pyx_bshape_0_rvalues = 0;
  Py_ssize_t __pyx_bshape_1_rvalues = 0;
  Py_buffer __pyx_bstruct_lvalues;
  Py_ssize_t __pyx_bstride_0_lvalues = 0;
  Py_ssize_t __pyx_bstride_1_lvalues = 0;
  Py_ssize_t __pyx_bshape_0_lvalues = 0;
  Py_ssize_t __pyx_bshape_1_lvalues = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  Py_buffer __pyx_bstruct_out;
  Py_ssize_t __pyx_bstride_0_out = 0;
  Py_ssize_t __pyx_bstride_1_out = 0;
  Py_ssize_t __pyx_bshape_0_out = 0;
  Py_ssize_t __pyx_bshape_1_out = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __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;
  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;
  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};
  __Pyx_RefNannySetupContext("left_join_2d");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[5] = {0,0,0,0,0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_lvalues = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_rvalues = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
    __pyx_v_out = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  __pyx_bstruct_lvalues.buf = NULL;
  __pyx_bstruct_rvalues.buf = NULL;
  __pyx_bstruct_out.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_lvalues, (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_bstride_0_lvalues = __pyx_bstruct_lvalues.strides[0]; __pyx_bstride_1_lvalues = __pyx_bstruct_lvalues.strides[1];
  __pyx_bshape_0_lvalues = __pyx_bstruct_lvalues.shape[0]; __pyx_bshape_1_lvalues = __pyx_bstruct_lvalues.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_rvalues, (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_bstride_0_rvalues = __pyx_bstruct_rvalues.strides[0]; __pyx_bstride_1_rvalues = __pyx_bstruct_rvalues.strides[1];
  __pyx_bshape_0_rvalues = __pyx_bstruct_rvalues.shape[0]; __pyx_bshape_1_rvalues = __pyx_bstruct_rvalues.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_out, (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_bstride_0_out = __pyx_bstruct_out.strides[0]; __pyx_bstride_1_out = __pyx_bstruct_out.strides[1];
  __pyx_bshape_0_out = __pyx_bstruct_out.shape[0]; __pyx_bshape_1_out = __pyx_bstruct_out.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_nleft = __pyx_t_4;
    __pyx_v_kleft = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_nleft = __pyx_t_5;
    __pyx_v_kleft = __pyx_t_4;
  }

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_nright = __pyx_t_4;
    __pyx_v_kright = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_2 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __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[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_nright = __pyx_t_5;
    __pyx_v_kright = __pyx_t_4;
  }

  /* "/Users/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;

  /* "/Users/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_4 = __pyx_v_nleft;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {

    /* "/Users/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_5 = __pyx_v_kleft;
    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {

      /* "/Users/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_7 = __pyx_v_i;
      __pyx_t_8 = __pyx_v_k;
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_10 = __pyx_v_k;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_9, __pyx_bstride_0_out, __pyx_t_10, __pyx_bstride_1_out) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_lvalues.buf, __pyx_t_7, __pyx_bstride_0_lvalues, __pyx_t_8, __pyx_bstride_1_lvalues));
    }

    /* "/Users/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_5 = __pyx_v_i;
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_left.buf, __pyx_t_5, __pyx_bstride_0_left));

    /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":140
 *         val = left[i]
 * 
 *         while j < nright and right[j] < val:             # <<<<<<<<<<<<<<
 *             j += 1
 * 
 */
    while (1) {
      __pyx_t_11 = (__pyx_v_j < __pyx_v_nright);
      if (__pyx_t_11) {
        __pyx_t_12 = __pyx_v_j;
        __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_12, __pyx_bstride_0_right)) < __pyx_v_val);
        __pyx_t_14 = __pyx_t_13;
      } else {
        __pyx_t_14 = __pyx_t_11;
      }
      if (!__pyx_t_14) break;

      /* "/Users/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);
    }

    /* "/Users/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_14 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_14) {

      /* "/Users/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_15 = (__pyx_v_kleft + __pyx_v_kright);
      for (__pyx_v_k = __pyx_v_kleft; __pyx_v_k < __pyx_t_15; __pyx_v_k++) {

        /* "/Users/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_16 = __pyx_v_i;
        __pyx_t_17 = __pyx_v_k;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_16, __pyx_bstride_0_out, __pyx_t_17, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_NaN;
      }

      /* "/Users/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_L6_continue;
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "/Users/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_15 = __pyx_v_j;
    __pyx_t_14 = (__pyx_v_val == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_15, __pyx_bstride_0_right)));
    if (__pyx_t_14) {

      /* "/Users/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_18 = (__pyx_v_kleft + __pyx_v_kright);
      for (__pyx_v_k = __pyx_v_kleft; __pyx_v_k < __pyx_t_18; __pyx_v_k++) {

        /* "/Users/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_19 = __pyx_v_j;
        __pyx_t_20 = (__pyx_v_k - __pyx_v_kleft);
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_22 = __pyx_v_k;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_21, __pyx_bstride_0_out, __pyx_t_22, __pyx_bstride_1_out) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_rvalues.buf, __pyx_t_19, __pyx_bstride_0_rvalues, __pyx_t_20, __pyx_bstride_1_rvalues));
      }
      goto __pyx_L15;
    }
    /*else*/ {

      /* "/Users/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_18 = (__pyx_v_kleft + __pyx_v_kright);
      for (__pyx_v_k = __pyx_v_kleft; __pyx_v_k < __pyx_t_18; __pyx_v_k++) {

        /* "/Users/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_23 = __pyx_v_i;
        __pyx_t_24 = __pyx_v_k;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_23, __pyx_bstride_0_out, __pyx_t_24, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_NaN;
      }
    }
    __pyx_L15:;
    __pyx_L6_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_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rvalues);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lvalues);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_2d");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rvalues);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lvalues);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_65left_join_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_65left_join_1d = {__Pyx_NAMESTR("left_join_1d"), (PyCFunction)__pyx_pf_6pandas_8_tseries_65left_join_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_65left_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;
  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;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_rvalues;
  Py_ssize_t __pyx_bstride_0_rvalues = 0;
  Py_ssize_t __pyx_bshape_0_rvalues = 0;
  Py_buffer __pyx_bstruct_lvalues;
  Py_ssize_t __pyx_bstride_0_lvalues = 0;
  Py_ssize_t __pyx_bshape_0_lvalues = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  Py_buffer __pyx_bstruct_out;
  Py_ssize_t __pyx_bstride_0_out = 0;
  Py_ssize_t __pyx_bstride_1_out = 0;
  Py_ssize_t __pyx_bshape_0_out = 0;
  Py_ssize_t __pyx_bshape_1_out = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  long __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __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;
  long __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  long __pyx_t_18;
  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};
  __Pyx_RefNannySetupContext("left_join_1d");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[5] = {0,0,0,0,0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_lvalues = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_rvalues = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
    __pyx_v_out = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  __pyx_bstruct_lvalues.buf = NULL;
  __pyx_bstruct_rvalues.buf = NULL;
  __pyx_bstruct_out.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_lvalues, (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_bstride_0_lvalues = __pyx_bstruct_lvalues.strides[0];
  __pyx_bshape_0_lvalues = __pyx_bstruct_lvalues.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_rvalues, (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_bstride_0_rvalues = __pyx_bstruct_rvalues.strides[0];
  __pyx_bshape_0_rvalues = __pyx_bstruct_rvalues.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_out, (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_bstride_0_out = __pyx_bstruct_out.strides[0]; __pyx_bstride_1_out = __pyx_bstruct_out.strides[1];
  __pyx_bshape_0_out = __pyx_bstruct_out.shape[0]; __pyx_bshape_1_out = __pyx_bstruct_out.shape[1];

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":165
 *         int64_t val
 * 
 *     nleft = len(lvalues)             # <<<<<<<<<<<<<<
 *     nright = len(rvalues)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_lvalues);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":166
 * 
 *     nleft = len(lvalues)
 *     nright = len(rvalues)             # <<<<<<<<<<<<<<
 * 
 *     j = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_rvalues);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":169
 * 
 *     j = 0
 *     for i from 0 <= i < nleft:             # <<<<<<<<<<<<<<
 *         out[i, 0] = lvalues[i]
 * 
 */
  __pyx_t_2 = __pyx_v_nleft;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_3 = __pyx_v_i;
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = 0;
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_4, __pyx_bstride_0_out, __pyx_t_5, __pyx_bstride_1_out) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_lvalues.buf, __pyx_t_3, __pyx_bstride_0_lvalues));

    /* "/Users/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_6 = __pyx_v_i;
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_left.buf, __pyx_t_6, __pyx_bstride_0_left));

    /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":174
 *         val = left[i]
 * 
 *         while j < nright and right[j] < val:             # <<<<<<<<<<<<<<
 *             j += 1
 * 
 */
    while (1) {
      __pyx_t_7 = (__pyx_v_j < __pyx_v_nright);
      if (__pyx_t_7) {
        __pyx_t_8 = __pyx_v_j;
        __pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_8, __pyx_bstride_0_right)) < __pyx_v_val);
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_7;
      }
      if (!__pyx_t_10) break;

      /* "/Users/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);
    }

    /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":177
 *             j += 1
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             out[i, 1] = NaN
 *             continue
 */
    __pyx_t_10 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_10) {

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":178
 * 
 *         if j == nright:
 *             out[i, 1] = NaN             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = 1;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_11, __pyx_bstride_0_out, __pyx_t_12, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_NaN;

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":179
 *         if j == nright:
 *             out[i, 1] = NaN
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         if val == right[j]:
 */
      goto __pyx_L6_continue;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":181
 *             continue
 * 
 *         if val == right[j]:             # <<<<<<<<<<<<<<
 *             out[i, 1] = rvalues[j]
 *         else:
 */
    __pyx_t_13 = __pyx_v_j;
    __pyx_t_10 = (__pyx_v_val == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_13, __pyx_bstride_0_right)));
    if (__pyx_t_10) {

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":182
 * 
 *         if val == right[j]:
 *             out[i, 1] = rvalues[j]             # <<<<<<<<<<<<<<
 *         else:
 *             out[i, 1] = NaN
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_16 = 1;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_15, __pyx_bstride_0_out, __pyx_t_16, __pyx_bstride_1_out) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_rvalues.buf, __pyx_t_14, __pyx_bstride_0_rvalues));
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/reindex.pyx":184
 *             out[i, 1] = rvalues[j]
 *         else:
 *             out[i, 1] = NaN             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_18 = 1;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_out.buf, __pyx_t_17, __pyx_bstride_0_out, __pyx_t_18, __pyx_bstride_1_out) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
    __pyx_L6_continue:;
  }

  __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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rvalues);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lvalues);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_1d");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rvalues);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lvalues);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_out);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_66take_join_contiguous(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_66take_join_contiguous = {__Pyx_NAMESTR("take_join_contiguous"), (PyCFunction)__pyx_pf_6pandas_8_tseries_66take_join_contiguous, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_66take_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;
  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;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rvalues;
  Py_ssize_t __pyx_bstride_0_rvalues = 0;
  Py_ssize_t __pyx_bstride_1_rvalues = 0;
  Py_ssize_t __pyx_bshape_0_rvalues = 0;
  Py_ssize_t __pyx_bshape_1_rvalues = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_lvalues;
  Py_ssize_t __pyx_bstride_0_lvalues = 0;
  Py_ssize_t __pyx_bstride_1_lvalues = 0;
  Py_ssize_t __pyx_bshape_0_lvalues = 0;
  Py_ssize_t __pyx_bshape_1_lvalues = 0;
  PyObject *__pyx_r = NULL;
  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;
  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};
  __Pyx_RefNannySetupContext("take_join_contiguous");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[5] = {0,0,0,0,0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_lvalues = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_rvalues = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_lindexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_rindexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
    __pyx_v_out = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_lvalues.buf = NULL;
  __pyx_bstruct_rvalues.buf = NULL;
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_lvalues, (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_bstride_0_lvalues = __pyx_bstruct_lvalues.strides[0]; __pyx_bstride_1_lvalues = __pyx_bstruct_lvalues.strides[1];
  __pyx_bshape_0_lvalues = __pyx_bstruct_lvalues.shape[0]; __pyx_bshape_1_lvalues = __pyx_bstruct_lvalues.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_rvalues, (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_bstride_0_rvalues = __pyx_bstruct_rvalues.strides[0]; __pyx_bstride_1_rvalues = __pyx_bstruct_rvalues.strides[1];
  __pyx_bshape_0_rvalues = __pyx_bstruct_rvalues.shape[0]; __pyx_bshape_1_rvalues = __pyx_bstruct_rvalues.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
  __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
  __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.shape[0];

  /* "/Users/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

  /* "/Users/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);

  /* "/Users/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_2 = ((PyObject *)__pyx_v_lindexer);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_4;

  /* "/Users/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]);

  /* "/Users/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]);

  /* "/Users/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++) {

    /* "/Users/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_bstruct_lindexer.buf, __pyx_t_5, __pyx_bstride_0_lindexer));

    /* "/Users/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_bstruct_rindexer.buf, __pyx_t_6, __pyx_bstride_0_rindexer));

    /* "/Users/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) {

      /* "/Users/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++) {

        /* "/Users/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;

        /* "/Users/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_L8;
    }
    /*else*/ {

      /* "/Users/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++) {

        /* "/Users/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_bstruct_lvalues.buf, __pyx_t_8, __pyx_bstride_0_lvalues, __pyx_t_9, __pyx_bstride_1_lvalues));

        /* "/Users/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_L8:;

    /* "/Users/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) {

      /* "/Users/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++) {

        /* "/Users/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;

        /* "/Users/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_L13;
    }
    /*else*/ {

      /* "/Users/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++) {

        /* "/Users/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_bstruct_rvalues.buf, __pyx_t_10, __pyx_bstride_0_rvalues, __pyx_t_11, __pyx_bstride_1_rvalues));

        /* "/Users/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_L13:;
  }

  __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_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rvalues);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lvalues);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_join_contiguous");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rvalues);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lvalues);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_67merge_indexer_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_67merge_indexer_list = {__Pyx_NAMESTR("merge_indexer_list"), (PyCFunction)__pyx_pf_6pandas_8_tseries_67merge_indexer_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_67merge_indexer_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  int __pyx_v_i;
  int __pyx_v_newLength;
  PyObject *__pyx_v_idx;
  PyArrayObject *__pyx_v_fill_vec;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_12;
  __pyx_t_5numpy_int32_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  __Pyx_RefNannySetupContext("merge_indexer_list");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  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;}

  /* "/Users/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:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __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[7]; __pyx_lineno = 236; __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_FromLong(__pyx_v_newLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __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[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[7]; __pyx_lineno = 236; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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++) {

    /* "/Users/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_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Users/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(__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) {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_14, __pyx_bstride_0_fill_vec) = __pyx_t_13;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_15, __pyx_bstride_0_fill_vec) = -1;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_fill_vec);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_list");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_68map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_map_indices_float64(PyArrayObject *__pyx_v_index, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("map_indices_float64");
  __pyx_bstruct_index.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":16
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_4, __pyx_bstride_0_index))); 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;
  }

  /* "/Users/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_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_float64");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_68map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_68map_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_pf_6pandas_8_tseries_68map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("map_indices_float64");
  __pyx_self = __pyx_self;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_index;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_map_indices_float64(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_69map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_map_indices_object(PyArrayObject *__pyx_v_index, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("map_indices_object");
  __pyx_bstruct_index.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":38
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_5, __pyx_bstride_0_index);
    __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;
  }

  /* "/Users/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_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_object");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_69map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_69map_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_pf_6pandas_8_tseries_69map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("map_indices_object");
  __pyx_self = __pyx_self;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_index;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_map_indices_object(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_70map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_map_indices_int32(PyArrayObject *__pyx_v_index, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("map_indices_int32");
  __pyx_bstruct_index.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":60
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_4, __pyx_bstride_0_index));
    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;
  }

  /* "/Users/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_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int32");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_70map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_70map_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_pf_6pandas_8_tseries_70map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("map_indices_int32");
  __pyx_self = __pyx_self;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_index;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_map_indices_int32(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_71map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_map_indices_int64(PyArrayObject *__pyx_v_index, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("map_indices_int64");
  __pyx_bstruct_index.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":82
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_4, __pyx_bstride_0_index));
    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;
  }

  /* "/Users/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_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int64");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_71map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_71map_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_pf_6pandas_8_tseries_71map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("map_indices_int64");
  __pyx_self = __pyx_self;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_index;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_map_indices_int64(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_72map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static  PyObject *__pyx_f_6pandas_8_tseries_map_indices_bool(PyArrayObject *__pyx_v_index, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("map_indices_bool");
  __pyx_bstruct_index.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":104
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_4, __pyx_bstride_0_index));
    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;
  }

  /* "/Users/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_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_bool");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_72map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_72map_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_pf_6pandas_8_tseries_72map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("map_indices_bool");
  __pyx_self = __pyx_self;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_index;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_map_indices_bool(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_73merge_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_73merge_indexer_float64 = {__Pyx_NAMESTR("merge_indexer_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_73merge_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_73merge_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  __Pyx_RefNannySetupContext("merge_indexer_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __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[8]; __pyx_lineno = 120; __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_newLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __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[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 120; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_2 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/Users/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_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values));

    /* "/Users/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(__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) {

      /* "/Users/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_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_t_6); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_15 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); 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_1); __pyx_t_1 = 0;
      __pyx_t_16 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_fill_vec.buf, __pyx_t_16, __pyx_bstride_0_fill_vec) = __pyx_t_15;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_17, __pyx_bstride_0_fill_vec) = -1;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_74merge_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_74merge_indexer_object = {__Pyx_NAMESTR("merge_indexer_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_74merge_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_74merge_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_newLength;
  PyObject *__pyx_v_idx;
  PyArrayObject *__pyx_v_fill_vec;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  __Pyx_RefNannySetupContext("merge_indexer_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __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[8]; __pyx_lineno = 138; __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_newLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __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[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 138; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_2 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/Users/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_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Users/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(__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) {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_16, __pyx_bstride_0_fill_vec) = __pyx_t_15;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_17, __pyx_bstride_0_fill_vec) = -1;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_75merge_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_75merge_indexer_int32 = {__Pyx_NAMESTR("merge_indexer_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_75merge_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_75merge_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  __Pyx_RefNannySetupContext("merge_indexer_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __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[8]; __pyx_lineno = 156; __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_newLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __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[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 156; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_2 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/Users/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_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values));

    /* "/Users/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(__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) {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_16, __pyx_bstride_0_fill_vec) = __pyx_t_15;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_17, __pyx_bstride_0_fill_vec) = -1;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_76merge_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_76merge_indexer_int64 = {__Pyx_NAMESTR("merge_indexer_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_76merge_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_76merge_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  __Pyx_RefNannySetupContext("merge_indexer_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __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[8]; __pyx_lineno = 174; __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_newLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __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[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 174; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_2 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/Users/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_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values));

    /* "/Users/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(__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) {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_16, __pyx_bstride_0_fill_vec) = __pyx_t_15;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_17, __pyx_bstride_0_fill_vec) = -1;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_77merge_indexer_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_77merge_indexer_bool = {__Pyx_NAMESTR("merge_indexer_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_77merge_indexer_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_77merge_indexer_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  __Pyx_RefNannySetupContext("merge_indexer_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __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[8]; __pyx_lineno = 192; __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_newLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __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[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 192; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_2 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/Users/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_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values));

    /* "/Users/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(__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) {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_16, __pyx_bstride_0_fill_vec) = __pyx_t_15;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_17, __pyx_bstride_0_fill_vec) = -1;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_78pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_78pad_float64 = {__Pyx_NAMESTR("pad_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_78pad_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_78pad_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_float64_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld;
  long __pyx_v_done;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("pad_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_nextOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":213
 *     cdef float64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __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[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __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[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 216; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":222
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":223
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":225
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_2 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_newIndex.buf, __pyx_t_2, __pyx_bstride_0_newIndex)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_15, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":234
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":236
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_curOld); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_t_1); 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_1); __pyx_t_1 = 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;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/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_L14;
      }
      __pyx_L14:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":241
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex))); 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_DECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":244
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex))); 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_1 = PyObject_RichCompare(__pyx_t_6, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); 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_1); __pyx_t_1 = 0;
        if (!__pyx_t_14) break;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":251
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":252
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":254
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":255
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L9_break;
        goto __pyx_L18;
      }
      __pyx_L18:;
    }
    __pyx_L13:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":257
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_DECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_79pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_79pad_object = {__Pyx_NAMESTR("pad_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_79pad_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_79pad_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  PyObject *__pyx_v_curOld;
  PyObject *__pyx_v_nextOld;
  long __pyx_v_done;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("pad_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_curOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_nextOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":271
 *     cdef object prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __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[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __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[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 274; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":280
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":281
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":283
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_2 = (__pyx_v_newLength - 1);
  __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_newIndex.buf, __pyx_t_2, __pyx_bstride_0_newIndex);
  __Pyx_INCREF((PyObject*)__pyx_t_1);
  __pyx_t_15 = 0;
  __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_oldIndex.buf, __pyx_t_15, __pyx_bstride_0_oldIndex);
  __Pyx_INCREF((PyObject*)__pyx_t_6);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_DECREF(__pyx_v_curOld);
    __pyx_v_curOld = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex);
      __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;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":292
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex);
      __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) {

        /* "/Users/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_L14;
      }
      __pyx_L14:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":299
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __Pyx_DECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":302
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex);
        __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;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":309
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":310
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":312
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":313
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L9_break;
        goto __pyx_L18;
      }
      __pyx_L18:;
    }
    __pyx_L13:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":315
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_DECREF(__pyx_v_curOld);
  __Pyx_DECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_80pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_80pad_int32 = {__Pyx_NAMESTR("pad_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_80pad_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_80pad_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_int32_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld;
  long __pyx_v_done;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("pad_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_nextOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":329
 *     cdef int32_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __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[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __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[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 332; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":338
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":339
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":341
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_2 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_newIndex.buf, __pyx_t_2, __pyx_bstride_0_newIndex)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_15, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":350
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":352
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":356
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":357
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_1 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":360
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/Users/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_1 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":367
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":368
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":370
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":371
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L9_break;
        goto __pyx_L18;
      }
      __pyx_L18:;
    }
    __pyx_L13:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":373
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_DECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_81pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_81pad_int64 = {__Pyx_NAMESTR("pad_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_81pad_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_81pad_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_int64_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld;
  long __pyx_v_done;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("pad_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_nextOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":387
 *     cdef int64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __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[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __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[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 390; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":396
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":397
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":399
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_2 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_newIndex.buf, __pyx_t_2, __pyx_bstride_0_newIndex)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_15, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":408
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":410
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":414
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":415
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_1 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":418
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/Users/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_1 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":425
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":426
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":428
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":429
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L9_break;
        goto __pyx_L18;
      }
      __pyx_L18:;
    }
    __pyx_L13:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":431
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_DECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_82pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_82pad_bool = {__Pyx_NAMESTR("pad_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_82pad_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_82pad_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_uint8_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld;
  long __pyx_v_done;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("pad_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_nextOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":445
 *     cdef uint8_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __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[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __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[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 448; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":454
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":455
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":457
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_2 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_newIndex.buf, __pyx_t_2, __pyx_bstride_0_newIndex)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_15, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":466
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":468
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_1 = __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_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":472
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":473
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_1 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":476
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/Users/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_1 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":483
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":484
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":486
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":487
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L9_break;
        goto __pyx_L18;
      }
      __pyx_L18:;
    }
    __pyx_L13:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":489
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_DECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_83backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_83backfill_float64 = {__Pyx_NAMESTR("backfill_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_83backfill_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_83backfill_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  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;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("backfill_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":504
 *     cdef float64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __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[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __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[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 507; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":513
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/Users/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);

  /* "/Users/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_2 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_newIndex.buf, __pyx_t_15, __pyx_bstride_0_newIndex)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_2, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":525
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":527
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_curOld); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_t_1); 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_1); __pyx_t_1 = 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;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/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_L14;
      }
      __pyx_L14:;

      /* "/Users/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_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex));

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":541
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;
    }
    __pyx_L13:;

    /* "/Users/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_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_84backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_84backfill_object = {__Pyx_NAMESTR("backfill_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_84backfill_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_84backfill_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  PyObject *__pyx_v_prevOld;
  PyObject *__pyx_v_curOld;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("backfill_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_prevOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_curOld = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":556
 *     cdef object prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __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[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __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[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 559; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":565
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/Users/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);

  /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_newIndex.buf, __pyx_t_15, __pyx_bstride_0_newIndex);
  __Pyx_INCREF((PyObject*)__pyx_t_1);
  __pyx_t_2 = (__pyx_v_oldLength - 1);
  __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_oldIndex.buf, __pyx_t_2, __pyx_bstride_0_oldIndex);
  __Pyx_INCREF((PyObject*)__pyx_t_6);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_DECREF(__pyx_v_curOld);
    __pyx_v_curOld = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex);
      __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;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":577
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex);
      __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) {

        /* "/Users/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_L14;
      }
      __pyx_L14:;

      /* "/Users/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_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __Pyx_DECREF(__pyx_v_prevOld);
      __pyx_v_prevOld = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex);
        __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;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":593
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;
    }
    __pyx_L13:;

    /* "/Users/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_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_DECREF(__pyx_v_prevOld);
  __Pyx_DECREF(__pyx_v_curOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_85backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_85backfill_int32 = {__Pyx_NAMESTR("backfill_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_85backfill_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_85backfill_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  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;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("backfill_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":608
 *     cdef int32_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __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[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __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[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 611; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":617
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/Users/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);

  /* "/Users/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_2 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_newIndex.buf, __pyx_t_15, __pyx_bstride_0_newIndex)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_2, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":629
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":631
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":635
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/Users/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_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex));

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":645
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;
    }
    __pyx_L13:;

    /* "/Users/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_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_86backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_86backfill_int64 = {__Pyx_NAMESTR("backfill_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_86backfill_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_86backfill_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  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;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("backfill_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":660
 *     cdef int64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __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[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __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[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 663; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":669
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/Users/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);

  /* "/Users/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_2 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_newIndex.buf, __pyx_t_15, __pyx_bstride_0_newIndex)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_2, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":681
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":683
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":687
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/Users/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_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex));

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":697
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;
    }
    __pyx_L13:;

    /* "/Users/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_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_87backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_87backfill_bool = {__Pyx_NAMESTR("backfill_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_87backfill_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_87backfill_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;
  PyObject *__pyx_v_newMap = 0;
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec;
  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;
  Py_buffer __pyx_bstruct_oldIndex;
  Py_ssize_t __pyx_bstride_0_oldIndex = 0;
  Py_ssize_t __pyx_bshape_0_oldIndex = 0;
  Py_buffer __pyx_bstruct_fill_vec;
  Py_ssize_t __pyx_bstride_0_fill_vec = 0;
  Py_ssize_t __pyx_bshape_0_fill_vec = 0;
  Py_buffer __pyx_bstruct_newIndex;
  Py_ssize_t __pyx_bstride_0_newIndex = 0;
  Py_ssize_t __pyx_bshape_0_newIndex = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  __Pyx_RefNannySetupContext("backfill_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_oldMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 2));
    __pyx_v_newMap = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_fill_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_fill_vec.buf = NULL;
  __pyx_bstruct_oldIndex.buf = NULL;
  __pyx_bstruct_newIndex.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_oldIndex, (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_bstride_0_oldIndex = __pyx_bstruct_oldIndex.strides[0];
  __pyx_bshape_0_oldIndex = __pyx_bstruct_oldIndex.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_newIndex, (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_bstride_0_newIndex = __pyx_bstruct_newIndex.strides[0];
  __pyx_bshape_0_newIndex = __pyx_bstruct_newIndex.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":712
 *     cdef uint8_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_oldIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_oldLength = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_newLength = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __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[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_newIndex);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __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[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 715; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_fill_vec);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_fill_vec, (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_bstruct_fill_vec, (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_bstride_0_fill_vec = __pyx_bstruct_fill_vec.strides[0];
    __pyx_bshape_0_fill_vec = __pyx_bstruct_fill_vec.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_DECREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":721
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/Users/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);

  /* "/Users/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_2 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_newIndex.buf, __pyx_t_15, __pyx_bstride_0_newIndex)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_oldIndex.buf, __pyx_t_2, __pyx_bstride_0_oldIndex)));
  if (__pyx_t_14) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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;

    /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_16, __pyx_bstride_0_oldIndex));

    /* "/Users/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_bstruct_newIndex.buf, __pyx_t_17, __pyx_bstride_0_newIndex)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/Users/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);

      /* "/Users/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) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":733
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":735
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_1 = __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_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/Users/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) {

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_18, __pyx_bstride_0_newIndex)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":739
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/Users/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_L9_break;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Users/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_bstruct_oldIndex.buf, __pyx_t_19, __pyx_bstride_0_oldIndex));

      /* "/Users/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_bstruct_newIndex.buf, __pyx_t_20, __pyx_bstride_0_newIndex)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/Users/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_bstruct_fill_vec.buf, __pyx_t_21, __pyx_bstride_0_fill_vec) = __pyx_v_curLoc;

        /* "/Users/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);

        /* "/Users/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) {

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":749
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L16_break;
          goto __pyx_L17;
        }
        __pyx_L17:;
      }
      __pyx_L16_break:;
    }
    __pyx_L13:;

    /* "/Users/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_L9_break:;

  /* "/Users/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_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_bstruct_oldIndex);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_oldIndex);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_fill_vec);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_newIndex);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_88pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_88pad_2d_inplace_float64 = {__Pyx_NAMESTR("pad_2d_inplace_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_88pad_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_88pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __pyx_t_5numpy_float64_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;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("pad_2d_inplace_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_7 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_7 == (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_7;

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_8 = __pyx_v_j;
    __pyx_t_9 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values, __pyx_t_9, __pyx_bstride_1_values));

    /* "/Users/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_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;

      /* "/Users/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_12 = __pyx_v_j;
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask, __pyx_t_13, __pyx_bstride_1_mask));
      if (__pyx_t_14) {

        /* "/Users/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_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_89pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_89pad_2d_inplace_object = {__Pyx_NAMESTR("pad_2d_inplace_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_89pad_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_89pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_7;
  long __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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("pad_2d_inplace_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_DECREF(__pyx_v_val);
  __pyx_v_val = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_7 = __pyx_v_j;
    __pyx_t_8 = 0;
    __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values, __pyx_t_8, __pyx_bstride_1_values);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/Users/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_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/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_11 = __pyx_v_j;
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_13 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_11, __pyx_bstride_0_mask, __pyx_t_12, __pyx_bstride_1_mask));
      if (__pyx_t_13) {

        /* "/Users/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_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_14, __pyx_bstride_0_values, __pyx_t_15, __pyx_bstride_1_values);
        __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_L10;
      }
      /*else*/ {

        /* "/Users/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_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values);
        __Pyx_INCREF((PyObject*)__pyx_t_3);
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_90pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_90pad_2d_inplace_int32 = {__Pyx_NAMESTR("pad_2d_inplace_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_90pad_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_90pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __pyx_t_5numpy_int32_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;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("pad_2d_inplace_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_7 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_7 == (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_7;

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_8 = __pyx_v_j;
    __pyx_t_9 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values, __pyx_t_9, __pyx_bstride_1_values));

    /* "/Users/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_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;

      /* "/Users/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_12 = __pyx_v_j;
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask, __pyx_t_13, __pyx_bstride_1_mask));
      if (__pyx_t_14) {

        /* "/Users/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_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_91pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_91pad_2d_inplace_int64 = {__Pyx_NAMESTR("pad_2d_inplace_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_91pad_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_91pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __pyx_t_5numpy_int64_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;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("pad_2d_inplace_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_7 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_7 == (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_7;

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_8 = __pyx_v_j;
    __pyx_t_9 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values, __pyx_t_9, __pyx_bstride_1_values));

    /* "/Users/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_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;

      /* "/Users/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_12 = __pyx_v_j;
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask, __pyx_t_13, __pyx_bstride_1_mask));
      if (__pyx_t_14) {

        /* "/Users/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_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_92pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_92pad_2d_inplace_bool = {__Pyx_NAMESTR("pad_2d_inplace_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_92pad_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_92pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __pyx_t_5numpy_uint8_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;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("pad_2d_inplace_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_7 = __Pyx_PyInt_from_py_npy_uint8(__pyx_t_3); if (unlikely((__pyx_t_7 == (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_7;

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_8 = __pyx_v_j;
    __pyx_t_9 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values, __pyx_t_9, __pyx_bstride_1_values));

    /* "/Users/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_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;

      /* "/Users/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_12 = __pyx_v_j;
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_7 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_12, __pyx_bstride_0_mask, __pyx_t_13, __pyx_bstride_1_mask));
      if (__pyx_t_7) {

        /* "/Users/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_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_14, __pyx_bstride_0_values, __pyx_t_15, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":844
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_93backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_93backfill_2d_inplace_float64 = {__Pyx_NAMESTR("backfill_2d_inplace_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_93backfill_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_93backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_uint8_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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("backfill_2d_inplace_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_7 = __pyx_v_j;
    __pyx_t_8 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values, __pyx_t_8, __pyx_bstride_1_values));

    /* "/Users/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_9 = (__pyx_v_N - 1); __pyx_t_9 > -1; __pyx_t_9-=1) {
      __pyx_v_i = __pyx_t_9;

      /* "/Users/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_10 = __pyx_v_j;
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_10, __pyx_bstride_0_mask, __pyx_t_11, __pyx_bstride_1_mask));
      if (__pyx_t_12) {

        /* "/Users/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_13 = __pyx_v_j;
        __pyx_t_14 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values, __pyx_t_14, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_94backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_94backfill_2d_inplace_object = {__Pyx_NAMESTR("backfill_2d_inplace_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_94backfill_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_94backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_uint8_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject **__pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("backfill_2d_inplace_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_7 = __pyx_v_j;
    __pyx_t_8 = (__pyx_v_N - 1);
    __pyx_t_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values, __pyx_t_8, __pyx_bstride_1_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/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_9 = (__pyx_v_N - 1); __pyx_t_9 > -1; __pyx_t_9-=1) {
      __pyx_v_i = __pyx_t_9;

      /* "/Users/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_10 = __pyx_v_j;
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_10, __pyx_bstride_0_mask, __pyx_t_11, __pyx_bstride_1_mask));
      if (__pyx_t_12) {

        /* "/Users/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_13 = __pyx_v_j;
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_15 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values, __pyx_t_14, __pyx_bstride_1_values);
        __Pyx_GOTREF(*__pyx_t_15);
        __Pyx_DECREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_val);
        *__pyx_t_15 = __pyx_v_val;
        __Pyx_GIVEREF(*__pyx_t_15);
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values);
        __Pyx_INCREF((PyObject*)__pyx_t_1);
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_1;
        __pyx_t_1 = 0;
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_95backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_95backfill_2d_inplace_int32 = {__Pyx_NAMESTR("backfill_2d_inplace_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_95backfill_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_95backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_uint8_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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("backfill_2d_inplace_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_7 = __pyx_v_j;
    __pyx_t_8 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values, __pyx_t_8, __pyx_bstride_1_values));

    /* "/Users/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_9 = (__pyx_v_N - 1); __pyx_t_9 > -1; __pyx_t_9-=1) {
      __pyx_v_i = __pyx_t_9;

      /* "/Users/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_10 = __pyx_v_j;
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_10, __pyx_bstride_0_mask, __pyx_t_11, __pyx_bstride_1_mask));
      if (__pyx_t_12) {

        /* "/Users/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_13 = __pyx_v_j;
        __pyx_t_14 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values, __pyx_t_14, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_96backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_96backfill_2d_inplace_int64 = {__Pyx_NAMESTR("backfill_2d_inplace_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_96backfill_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_96backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_uint8_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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("backfill_2d_inplace_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_7 = __pyx_v_j;
    __pyx_t_8 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values, __pyx_t_8, __pyx_bstride_1_values));

    /* "/Users/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_9 = (__pyx_v_N - 1); __pyx_t_9 > -1; __pyx_t_9-=1) {
      __pyx_v_i = __pyx_t_9;

      /* "/Users/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_10 = __pyx_v_j;
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_10, __pyx_bstride_0_mask, __pyx_t_11, __pyx_bstride_1_mask));
      if (__pyx_t_12) {

        /* "/Users/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_13 = __pyx_v_j;
        __pyx_t_14 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values, __pyx_t_14, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_97backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_97backfill_2d_inplace_bool = {__Pyx_NAMESTR("backfill_2d_inplace_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_97backfill_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_97backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  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;
  Py_buffer __pyx_bstruct_mask;
  Py_ssize_t __pyx_bstride_0_mask = 0;
  Py_ssize_t __pyx_bstride_1_mask = 0;
  Py_ssize_t __pyx_bshape_0_mask = 0;
  Py_ssize_t __pyx_bshape_1_mask = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __pyx_t_5numpy_uint8_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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  __Pyx_RefNannySetupContext("backfill_2d_inplace_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_mask = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_mask.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mask, (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_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1];
  __pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1];

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_K = __pyx_t_4;
    __pyx_v_N = __pyx_t_5;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (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_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (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;
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_K = __pyx_t_5;
    __pyx_v_N = __pyx_t_4;
  }

  /* "/Users/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_4 = __pyx_v_K;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "/Users/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_7 = __pyx_v_j;
    __pyx_t_8 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values, __pyx_t_8, __pyx_bstride_1_values));

    /* "/Users/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_9 = (__pyx_v_N - 1); __pyx_t_9 > -1; __pyx_t_9-=1) {
      __pyx_v_i = __pyx_t_9;

      /* "/Users/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_10 = __pyx_v_j;
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_mask.buf, __pyx_t_10, __pyx_bstride_0_mask, __pyx_t_11, __pyx_bstride_1_mask));
      if (__pyx_t_12) {

        /* "/Users/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_13 = __pyx_v_j;
        __pyx_t_14 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values, __pyx_t_14, __pyx_bstride_1_values) = __pyx_v_val;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":925
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values, __pyx_t_16, __pyx_bstride_1_values));
      }
      __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_mask);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_98take_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_98take_1d_float64 = {__Pyx_NAMESTR("take_1d_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_98take_1d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_98take_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf;
  __pyx_t_5numpy_float64_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_1d_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_27;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":936
 *         float64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":939
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __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[8]; __pyx_lineno = 939; __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[8]; __pyx_lineno = 939; __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[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_6 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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);
        __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_L10;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_16, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values));
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_18, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf) = __pyx_v_fv;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_21, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_20, __pyx_bstride_0_values));
      }
      __pyx_L13:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_99take_1d_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_99take_1d_object = {__Pyx_NAMESTR("take_1d_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_99take_1d_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_99take_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf;
  PyObject *__pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_1d_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_30;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_fv = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":968
 *         object fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":971
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __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[8]; __pyx_lineno = 971; __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[8]; __pyx_lineno = 971; __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[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_6 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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);
        __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_L10;
      }
      /*else*/ {

        /* "/Users/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_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values);
        __Pyx_INCREF((PyObject*)__pyx_t_6);
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_outbuf.buf, __pyx_t_16, __pyx_bstride_0_outbuf);
        __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:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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_DECREF(__pyx_v_fv);
    __pyx_v_fv = __pyx_v_fill_value;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_18, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf);
        __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_L13;
      }
      /*else*/ {

        /* "/Users/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_bstruct_values.buf, __pyx_t_20, __pyx_bstride_0_values);
        __Pyx_INCREF((PyObject*)__pyx_t_6);
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_outbuf.buf, __pyx_t_21, __pyx_bstride_0_outbuf);
        __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_L13:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_DECREF(__pyx_v_fv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_100take_1d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_100take_1d_int32 = {__Pyx_NAMESTR("take_1d_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_100take_1d_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_100take_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf;
  __pyx_t_5numpy_int32_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_1d_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_32;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1000
 *         int32_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1003
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __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[8]; __pyx_lineno = 1003; __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[8]; __pyx_lineno = 1003; __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[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_6 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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);
        __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_L10;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_16, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values));
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_18, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf) = __pyx_v_fv;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_21, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_20, __pyx_bstride_0_values));
      }
      __pyx_L13:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_101take_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_101take_1d_int64 = {__Pyx_NAMESTR("take_1d_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_101take_1d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_101take_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf;
  __pyx_t_5numpy_int64_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_1d_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_34;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1032
 *         int64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1035
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __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[8]; __pyx_lineno = 1035; __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[8]; __pyx_lineno = 1035; __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[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_6 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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);
        __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_L10;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_16, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values));
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_18, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf) = __pyx_v_fv;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_21, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_20, __pyx_bstride_0_values));
      }
      __pyx_L13:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_102take_1d_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_102take_1d_bool = {__Pyx_NAMESTR("take_1d_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_102take_1d_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_102take_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf;
  __pyx_t_5numpy_uint8_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_1d_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_36;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1064
 *         uint8_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1067
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __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[8]; __pyx_lineno = 1067; __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[8]; __pyx_lineno = 1067; __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[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_6 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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);
        __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_L10;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_16, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_15, __pyx_bstride_0_values));
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_18, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf) = __pyx_v_fv;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "/Users/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_bstruct_outbuf.buf, __pyx_t_21, __pyx_bstride_0_outbuf) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_20, __pyx_bstride_0_values));
      }
      __pyx_L13:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_103is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_103is_monotonic_float64 = {__Pyx_NAMESTR("is_monotonic_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_103is_monotonic_float64, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_103is_monotonic_float64(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  __Pyx_RefNannySetupContext("is_monotonic_float64");
  __pyx_self = __pyx_self;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1095
 *         float64_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1097
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_3 = (__pyx_v_n < 2);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1098
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __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;
  }
  __pyx_L5:;

  /* "/Users/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_bstruct_arr.buf, __pyx_t_4, __pyx_bstride_0_arr));

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/Users/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_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr));

    /* "/Users/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_3 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_3) {

      /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1104; __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_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1105
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1106
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __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_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_104is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_104is_monotonic_object = {__Pyx_NAMESTR("is_monotonic_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_104is_monotonic_object, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_104is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_prev;
  PyObject *__pyx_v_cur;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  __Pyx_RefNannySetupContext("is_monotonic_object");
  __pyx_self = __pyx_self;
  __pyx_v_prev = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_cur = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1115
 *         object prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1117
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_3 = (__pyx_v_n < 2);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1118
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1118; __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;
  }
  __pyx_L5:;

  /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_arr.buf, __pyx_t_4, __pyx_bstride_0_arr);
  __Pyx_INCREF((PyObject*)__pyx_t_1);
  __Pyx_DECREF(__pyx_v_prev);
  __pyx_v_prev = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_cur);
    __pyx_v_cur = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/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_1 = PyObject_RichCompare(__pyx_v_cur, __pyx_v_prev, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __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_L8;
    }
    __pyx_L8:;

    /* "/Users/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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1126
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1126; __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_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_prev);
  __Pyx_DECREF(__pyx_v_cur);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_105is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_105is_monotonic_int32 = {__Pyx_NAMESTR("is_monotonic_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_105is_monotonic_int32, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_105is_monotonic_int32(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  __Pyx_RefNannySetupContext("is_monotonic_int32");
  __pyx_self = __pyx_self;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1135
 *         int32_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1137
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_3 = (__pyx_v_n < 2);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1138
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __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;
  }
  __pyx_L5:;

  /* "/Users/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_bstruct_arr.buf, __pyx_t_4, __pyx_bstride_0_arr));

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/Users/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_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr));

    /* "/Users/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_3 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_3) {

      /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __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_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1145
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1146
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __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_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_106is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_106is_monotonic_int64 = {__Pyx_NAMESTR("is_monotonic_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_106is_monotonic_int64, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_106is_monotonic_int64(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  __Pyx_RefNannySetupContext("is_monotonic_int64");
  __pyx_self = __pyx_self;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1155
 *         int64_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1157
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_3 = (__pyx_v_n < 2);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1158
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __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;
  }
  __pyx_L5:;

  /* "/Users/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_bstruct_arr.buf, __pyx_t_4, __pyx_bstride_0_arr));

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/Users/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_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr));

    /* "/Users/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_3 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_3) {

      /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __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_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1165
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1166
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1166; __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_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_107is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_107is_monotonic_bool = {__Pyx_NAMESTR("is_monotonic_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_107is_monotonic_bool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_107is_monotonic_bool(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  __Pyx_RefNannySetupContext("is_monotonic_bool");
  __pyx_self = __pyx_self;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1175
 *         uint8_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1177
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_3 = (__pyx_v_n < 2);
  if (__pyx_t_3) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1178
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __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;
  }
  __pyx_L5:;

  /* "/Users/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_bstruct_arr.buf, __pyx_t_4, __pyx_bstride_0_arr));

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/Users/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_bstruct_arr.buf, __pyx_t_6, __pyx_bstride_0_arr));

    /* "/Users/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_3 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_3) {

      /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1184; __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_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1185
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1186
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __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_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_108groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_108groupby_float64 = {__Pyx_NAMESTR("groupby_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_108groupby_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_108groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members;
  PyObject *__pyx_v_idx;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("groupby_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_members = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1197
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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 = ((PyObject *)__pyx_v_labels);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = get_value_1d(((PyArrayObject *)__pyx_t_1), __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1202
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_5 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1203
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1205
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_4 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1206
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1207
 *         idx = index[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[8]; __pyx_lineno = 1207; __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[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1208
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(__pyx_v_members == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_7 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1210
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/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);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_members);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_109groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_109groupby_object = {__Pyx_NAMESTR("groupby_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_109groupby_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_109groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members;
  PyObject *__pyx_v_idx;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("groupby_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_members = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1222
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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 = ((PyObject *)__pyx_v_labels);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = get_value_1d(((PyArrayObject *)__pyx_t_1), __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1227
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_5 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1228
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1230
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1231
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1232
 *         idx = index[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[8]; __pyx_lineno = 1232; __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[8]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1233
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(__pyx_v_members == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_7 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1235
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/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);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_members);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_110groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_110groupby_int32 = {__Pyx_NAMESTR("groupby_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_110groupby_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_110groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members;
  PyObject *__pyx_v_idx;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("groupby_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_members = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1247
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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 = ((PyObject *)__pyx_v_labels);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = get_value_1d(((PyArrayObject *)__pyx_t_1), __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1252
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_5 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1253
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1255
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1256
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1257
 *         idx = index[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[8]; __pyx_lineno = 1257; __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[8]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1258
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(__pyx_v_members == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_7 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1260
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/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);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_members);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_111groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_111groupby_int64 = {__Pyx_NAMESTR("groupby_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_111groupby_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_111groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members;
  PyObject *__pyx_v_idx;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("groupby_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_members = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1272
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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 = ((PyObject *)__pyx_v_labels);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = get_value_1d(((PyArrayObject *)__pyx_t_1), __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1277
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_5 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1278
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1280
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1281
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1282
 *         idx = index[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[8]; __pyx_lineno = 1282; __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[8]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1283
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(__pyx_v_members == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_7 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1285
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/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);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_members);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_112groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_112groupby_bool = {__Pyx_NAMESTR("groupby_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_112groupby_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_112groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members;
  PyObject *__pyx_v_idx;
  PyObject *__pyx_v_key;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  __Pyx_RefNannySetupContext("groupby_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_labels = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_members = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1297
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "/Users/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;

    /* "/Users/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 = ((PyObject *)__pyx_v_labels);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = get_value_1d(((PyArrayObject *)__pyx_t_1), __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1302
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_5 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1303
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1305
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1306
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1307
 *         idx = index[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[8]; __pyx_lineno = 1307; __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[8]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1308
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(__pyx_v_members == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_7 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1310
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/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);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_members);
  __Pyx_DECREF(__pyx_v_idx);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_113arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_113arrmap_float64 = {__Pyx_NAMESTR("arrmap_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_113arrmap_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_113arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("arrmap_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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]);

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_9, __pyx_bstride_0_index))); 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(((PyObject *)__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_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
    __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;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_114arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_114arrmap_object = {__Pyx_NAMESTR("arrmap_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_114arrmap_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_114arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("arrmap_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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]);

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_9, __pyx_bstride_0_index);
    __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(((PyObject *)__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_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
    __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;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_115arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_115arrmap_int32 = {__Pyx_NAMESTR("arrmap_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_115arrmap_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_115arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("arrmap_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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]);

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_9, __pyx_bstride_0_index))); 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(((PyObject *)__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_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
    __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;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_116arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_116arrmap_int64 = {__Pyx_NAMESTR("arrmap_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_116arrmap_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_116arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("arrmap_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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]);

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_9, __pyx_bstride_0_index))); 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(((PyObject *)__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_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
    __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;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_117arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_117arrmap_bool = {__Pyx_NAMESTR("arrmap_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_117arrmap_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_117arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("arrmap_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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]);

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result, (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_bstruct_result.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
      __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

    /* "/Users/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_bstruct_index.buf, __pyx_t_9, __pyx_bstride_0_index))); 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(((PyObject *)__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_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
    __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;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_118take_2d_axis0_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_118take_2d_axis0_float64 = {__Pyx_NAMESTR("take_2d_axis0_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_118take_2d_axis0_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_118take_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;
  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;
  __pyx_t_5numpy_float64_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis0_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_38;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1391
 *         float64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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]);

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __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[8]; __pyx_lineno = 1395; __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[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_18, __pyx_bstride_0_outbuf, __pyx_t_19, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_22, __pyx_bstride_0_outbuf, __pyx_t_23, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_26, __pyx_bstride_0_outbuf, __pyx_t_27, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_24, __pyx_bstride_0_values, __pyx_t_25, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_119take_2d_axis0_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_119take_2d_axis0_object = {__Pyx_NAMESTR("take_2d_axis0_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_119take_2d_axis0_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_119take_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;
  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;
  PyObject *__pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis0_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_40;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_fv = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1429
 *         object fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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]);

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __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[8]; __pyx_lineno = 1433; __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[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_20 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_outbuf.buf, __pyx_t_18, __pyx_bstride_0_outbuf, __pyx_t_19, __pyx_bstride_1_outbuf);
          __Pyx_GOTREF(*__pyx_t_20);
          __Pyx_DECREF(*__pyx_t_20); __Pyx_INCREF(__pyx_t_1);
          *__pyx_t_20 = __pyx_t_1;
          __Pyx_GIVEREF(*__pyx_t_20);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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_DECREF(__pyx_v_fv);
    __pyx_v_fv = __pyx_v_fill_value;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_22, __pyx_bstride_0_outbuf, __pyx_t_23, __pyx_bstride_1_outbuf);
          __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_L17;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_24, __pyx_bstride_0_values, __pyx_t_25, __pyx_bstride_1_values);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_27 = __pyx_v_j;
          __pyx_t_20 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_outbuf.buf, __pyx_t_26, __pyx_bstride_0_outbuf, __pyx_t_27, __pyx_bstride_1_outbuf);
          __Pyx_GOTREF(*__pyx_t_20);
          __Pyx_DECREF(*__pyx_t_20); __Pyx_INCREF(__pyx_t_1);
          *__pyx_t_20 = __pyx_t_1;
          __Pyx_GIVEREF(*__pyx_t_20);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_DECREF(__pyx_v_fv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_120take_2d_axis0_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_120take_2d_axis0_int32 = {__Pyx_NAMESTR("take_2d_axis0_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_120take_2d_axis0_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_120take_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;
  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;
  __pyx_t_5numpy_int32_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis0_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_42;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1467
 *         int32_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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]);

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __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[8]; __pyx_lineno = 1471; __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[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_18, __pyx_bstride_0_outbuf, __pyx_t_19, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_22, __pyx_bstride_0_outbuf, __pyx_t_23, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_26, __pyx_bstride_0_outbuf, __pyx_t_27, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_24, __pyx_bstride_0_values, __pyx_t_25, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_121take_2d_axis0_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_121take_2d_axis0_int64 = {__Pyx_NAMESTR("take_2d_axis0_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_121take_2d_axis0_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_121take_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;
  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;
  __pyx_t_5numpy_int64_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis0_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_44;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1505
 *         int64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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]);

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __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[8]; __pyx_lineno = 1509; __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[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_18, __pyx_bstride_0_outbuf, __pyx_t_19, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_22, __pyx_bstride_0_outbuf, __pyx_t_23, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_26, __pyx_bstride_0_outbuf, __pyx_t_27, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_24, __pyx_bstride_0_values, __pyx_t_25, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_122take_2d_axis0_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_122take_2d_axis0_bool = {__Pyx_NAMESTR("take_2d_axis0_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_122take_2d_axis0_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_122take_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;
  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;
  __pyx_t_5numpy_uint8_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis0_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_46;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1543
 *         uint8_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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]);

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __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[8]; __pyx_lineno = 1547; __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[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_18, __pyx_bstride_0_outbuf, __pyx_t_19, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_16, __pyx_bstride_0_values, __pyx_t_17, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_22, __pyx_bstride_0_outbuf, __pyx_t_23, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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++) {

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_26, __pyx_bstride_0_outbuf, __pyx_t_27, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_24, __pyx_bstride_0_values, __pyx_t_25, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_123take_2d_axis1_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_123take_2d_axis1_float64 = {__Pyx_NAMESTR("take_2d_axis1_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_123take_2d_axis1_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_123take_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;
  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;
  __pyx_t_5numpy_float64_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis1_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_48;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1582
 *         float64_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1583
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __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[8]; __pyx_lineno = 1586; __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[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1591
 * 
 *     if False and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf, __pyx_t_20, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1602
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_23, __pyx_bstride_0_outbuf, __pyx_t_24, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_27, __pyx_bstride_0_outbuf, __pyx_t_28, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_124take_2d_axis1_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_124take_2d_axis1_object = {__Pyx_NAMESTR("take_2d_axis1_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_124take_2d_axis1_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_124take_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;
  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;
  PyObject *__pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis1_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_50;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_fv = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1622
 *         object fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1623
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __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[8]; __pyx_lineno = 1626; __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[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1631
 * 
 *     if False and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_19 = __pyx_v_i;
          __pyx_t_20 = __pyx_v_j;
          __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf, __pyx_t_20, __pyx_bstride_1_outbuf);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_1);
          *__pyx_t_21 = __pyx_t_1;
          __Pyx_GIVEREF(*__pyx_t_21);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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_DECREF(__pyx_v_fv);
    __pyx_v_fv = __pyx_v_fill_value;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1642
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_23, __pyx_bstride_0_outbuf, __pyx_t_24, __pyx_bstride_1_outbuf);
          __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_L17;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = __pyx_v_j;
          __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_outbuf.buf, __pyx_t_27, __pyx_bstride_0_outbuf, __pyx_t_28, __pyx_bstride_1_outbuf);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_1);
          *__pyx_t_21 = __pyx_t_1;
          __Pyx_GIVEREF(*__pyx_t_21);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_DECREF(__pyx_v_fv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_125take_2d_axis1_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_125take_2d_axis1_int32 = {__Pyx_NAMESTR("take_2d_axis1_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_125take_2d_axis1_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_125take_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;
  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;
  __pyx_t_5numpy_int32_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis1_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_52;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1662
 *         int32_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1663
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __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[8]; __pyx_lineno = 1666; __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[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1671
 * 
 *     if True and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf, __pyx_t_20, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1682
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_23, __pyx_bstride_0_outbuf, __pyx_t_24, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_27, __pyx_bstride_0_outbuf, __pyx_t_28, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_126take_2d_axis1_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_126take_2d_axis1_int64 = {__Pyx_NAMESTR("take_2d_axis1_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_126take_2d_axis1_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_126take_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;
  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;
  __pyx_t_5numpy_int64_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis1_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_54;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1702
 *         int64_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1703
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __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[8]; __pyx_lineno = 1706; __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[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1711
 * 
 *     if True and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf, __pyx_t_20, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1722
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_23, __pyx_bstride_0_outbuf, __pyx_t_24, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_27, __pyx_bstride_0_outbuf, __pyx_t_28, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_127take_2d_axis1_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_127take_2d_axis1_bool = {__Pyx_NAMESTR("take_2d_axis1_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_127take_2d_axis1_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_127take_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;
  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;
  __pyx_t_5numpy_uint8_t __pyx_v_fv;
  Py_buffer __pyx_bstruct_outbuf;
  Py_ssize_t __pyx_bstride_0_outbuf = 0;
  Py_ssize_t __pyx_bstride_1_outbuf = 0;
  Py_ssize_t __pyx_bshape_0_outbuf = 0;
  Py_ssize_t __pyx_bshape_1_outbuf = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  __Pyx_RefNannySetupContext("take_2d_axis1_bool");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};

    /* "/Users/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;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_out = ((PyObject *)Py_None);
    __pyx_v_fill_value = __pyx_k_56;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_fill_value = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_out = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_outbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_outbuf.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1742
 *         uint8_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1743
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __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[8]; __pyx_lineno = 1746; __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[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 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(((PyObject *)__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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_bstruct_outbuf);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_outbuf, (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_bstruct_outbuf, (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_bstride_0_outbuf = __pyx_bstruct_outbuf.strides[0]; __pyx_bstride_1_outbuf = __pyx_bstruct_outbuf.strides[1];
      __pyx_bshape_0_outbuf = __pyx_bstruct_outbuf.shape[0]; __pyx_bshape_1_outbuf = __pyx_bstruct_outbuf.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_DECREF(((PyObject *)__pyx_v_outbuf));
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L6:;

  /* "/Users/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_1 = __pyx_v_fill_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknan(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __pyx_t_3;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1751
 * 
 *     if True and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_14, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_Raise(__pyx_t_1, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_19, __pyx_bstride_0_outbuf, __pyx_t_20, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));
        }
      }
      __pyx_L10:;
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1762
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_2 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_15, __pyx_bstride_0_indexer));

      /* "/Users/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) {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_23, __pyx_bstride_0_outbuf, __pyx_t_24, __pyx_bstride_1_outbuf) = __pyx_v_fv;
        }
        goto __pyx_L17;
      }
      /*else*/ {

        /* "/Users/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;

          /* "/Users/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_bstruct_outbuf.buf, __pyx_t_27, __pyx_bstride_0_outbuf, __pyx_t_28, __pyx_bstride_1_outbuf) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values));
        }
      }
      __pyx_L17:;
    }
  }
  __pyx_L7:;

  __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_bstruct_outbuf);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_outbuf);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_128left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_128left_join_indexer_float64 = {__Pyx_NAMESTR("left_join_indexer_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_128left_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_128left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  __pyx_t_5numpy_float64_t __pyx_v_rval;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("left_join_indexer_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1782
 *         float64_t lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1783
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1784
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __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[8]; __pyx_lineno = 1787; __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_nleft); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __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[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1787; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1790
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1793
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_2 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_indexer.buf, __pyx_t_2, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1794
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1795
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L6_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/Users/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_bstruct_right.buf, __pyx_t_13, __pyx_bstride_0_right));

    /* "/Users/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_bstruct_left.buf, __pyx_t_14, __pyx_bstride_0_left)) == __pyx_v_rval);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_17, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_18, __pyx_bstride_0_left)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right)));
    if (__pyx_t_16) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_20, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);

      /* "/Users/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_bstruct_left.buf, __pyx_t_21, __pyx_bstride_0_left)) == __pyx_v_rval);
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/Users/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_bstruct_indexer.buf, __pyx_t_22, __pyx_bstride_0_indexer) = __pyx_v_j;

        /* "/Users/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);
      }

      /* "/Users/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_L12;
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left)) > __pyx_v_rval);
    if (__pyx_t_15) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_24, __pyx_bstride_0_indexer) = -1;

      /* "/Users/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_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_25, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1815
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L12:;
    __pyx_L6_continue:;
  }
  __pyx_L7_break:;

  /* "/Users/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_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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_129left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_129left_join_indexer_object = {__Pyx_NAMESTR("left_join_indexer_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_129left_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_129left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyObject *__pyx_v_rval;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("left_join_indexer_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rval = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1827
 *         object lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1828
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1829
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __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[8]; __pyx_lineno = 1832; __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_nleft); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __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[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1832; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1835
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1838
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_2 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_indexer.buf, __pyx_t_2, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1839
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1840
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L6_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/Users/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_bstruct_right.buf, __pyx_t_13, __pyx_bstride_0_right);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__pyx_v_rval);
    __pyx_v_rval = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Users/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_bstruct_left.buf, __pyx_t_14, __pyx_bstride_0_left);
        __Pyx_INCREF((PyObject*)__pyx_t_6);
        __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); 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_1); __pyx_t_1 = 0;
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_17, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);
    }

    /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_18, __pyx_bstride_0_left);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __pyx_t_19 = __pyx_v_j;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 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) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_20, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);

      /* "/Users/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_bstruct_left.buf, __pyx_t_21, __pyx_bstride_0_left);
          __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;

        /* "/Users/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_bstruct_indexer.buf, __pyx_t_22, __pyx_bstride_0_indexer) = __pyx_v_j;

        /* "/Users/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);
      }

      /* "/Users/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_L12;
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left);
    __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) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_24, __pyx_bstride_0_indexer) = -1;

      /* "/Users/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_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_25, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1860
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L12:;
    __pyx_L6_continue:;
  }
  __pyx_L7_break:;

  /* "/Users/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_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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_DECREF(__pyx_v_rval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_130left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_130left_join_indexer_int32 = {__Pyx_NAMESTR("left_join_indexer_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_130left_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_130left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  __pyx_t_5numpy_int32_t __pyx_v_rval;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("left_join_indexer_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1872
 *         int32_t lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1873
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1874
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __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[8]; __pyx_lineno = 1877; __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_nleft); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __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[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1877; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1880
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1883
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_2 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_indexer.buf, __pyx_t_2, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1884
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1885
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L6_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/Users/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_bstruct_right.buf, __pyx_t_13, __pyx_bstride_0_right));

    /* "/Users/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_bstruct_left.buf, __pyx_t_14, __pyx_bstride_0_left)) == __pyx_v_rval);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_17, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_18, __pyx_bstride_0_left)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right)));
    if (__pyx_t_16) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_20, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);

      /* "/Users/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_bstruct_left.buf, __pyx_t_21, __pyx_bstride_0_left)) == __pyx_v_rval);
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/Users/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_bstruct_indexer.buf, __pyx_t_22, __pyx_bstride_0_indexer) = __pyx_v_j;

        /* "/Users/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);
      }

      /* "/Users/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_L12;
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left)) > __pyx_v_rval);
    if (__pyx_t_15) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_24, __pyx_bstride_0_indexer) = -1;

      /* "/Users/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_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_25, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1905
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L12:;
    __pyx_L6_continue:;
  }
  __pyx_L7_break:;

  /* "/Users/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_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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_131left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_131left_join_indexer_int64 = {__Pyx_NAMESTR("left_join_indexer_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_131left_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_131left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  __pyx_t_5numpy_int64_t __pyx_v_rval;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("left_join_indexer_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1917
 *         int64_t lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1918
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1919
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/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 *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __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[8]; __pyx_lineno = 1922; __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_nleft); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __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[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[8]; __pyx_lineno = 1922; __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[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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1925
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/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) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1928
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_2 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_indexer.buf, __pyx_t_2, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1929
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1930
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L6_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/Users/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_bstruct_right.buf, __pyx_t_13, __pyx_bstride_0_right));

    /* "/Users/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_bstruct_left.buf, __pyx_t_14, __pyx_bstride_0_left)) == __pyx_v_rval);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_17, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_18, __pyx_bstride_0_left)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right)));
    if (__pyx_t_16) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_20, __pyx_bstride_0_indexer) = __pyx_v_j;

      /* "/Users/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);

      /* "/Users/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_bstruct_left.buf, __pyx_t_21, __pyx_bstride_0_left)) == __pyx_v_rval);
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/Users/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_bstruct_indexer.buf, __pyx_t_22, __pyx_bstride_0_indexer) = __pyx_v_j;

        /* "/Users/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);
      }

      /* "/Users/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_L12;
    }

    /* "/Users/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_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left)) > __pyx_v_rval);
    if (__pyx_t_15) {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_24, __pyx_bstride_0_indexer) = -1;

      /* "/Users/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_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_indexer.buf, __pyx_t_25, __pyx_bstride_0_indexer) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1950
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L12:;
    __pyx_L6_continue:;
  }
  __pyx_L7_break:;

  /* "/Users/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_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_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_132outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_132outer_join_indexer_float64 = {__Pyx_NAMESTR("outer_join_indexer_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_132outer_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_132outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("outer_join_indexer_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1964
 *         ndarray[float64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1965
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1967
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1968
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1969
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1971
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1972
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1974
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L7_break;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1976
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1977
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1979
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L7_break;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1980
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1981
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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);

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1983
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1984
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1986
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_4 = __pyx_v_j;
      __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right.buf, __pyx_t_4, __pyx_bstride_0_right)));
      if (__pyx_t_3) {

        /* "/Users/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);

        /* "/Users/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_L14;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1989
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_6 = __pyx_v_j;
      __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left.buf, __pyx_t_5, __pyx_bstride_0_left)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right)));
      if (__pyx_t_3) {

        /* "/Users/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_L14;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":1992
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L14:;

      /* "/Users/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_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2003
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2004
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2006
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2007
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2009
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L16_break;
        goto __pyx_L18;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2011
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/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_bstruct_lindexer.buf, __pyx_t_17, __pyx_bstride_0_lindexer) = -1;

          /* "/Users/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_bstruct_rindexer.buf, __pyx_t_18, __pyx_bstride_0_rindexer) = __pyx_v_j;

          /* "/Users/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_bstruct_result.buf, __pyx_t_20, __pyx_bstride_0_result) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right));

          /* "/Users/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);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2017
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L16_break;
      }
      __pyx_L18:;
      goto __pyx_L17;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2018
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/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_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_21, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_22, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_24, __pyx_bstride_0_result) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left));

        /* "/Users/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);

        /* "/Users/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);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2025
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L16_break;
      goto __pyx_L17;
    }
    /*else*/ {

      /* "/Users/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_bstruct_left.buf, __pyx_t_25, __pyx_bstride_0_left));

      /* "/Users/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_bstruct_right.buf, __pyx_t_26, __pyx_bstride_0_right));

      /* "/Users/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_3 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_27, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_28, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_29, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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);

        /* "/Users/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_L23;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2035
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_3 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_30, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_31, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_32, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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_L23;
      }
      /*else*/ {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_33, __pyx_bstride_0_lindexer) = -1;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_34, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_35, __pyx_bstride_0_result) = __pyx_v_rval;

        /* "/Users/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_L23:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2046
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L17:;
  }
  __pyx_L16_break:;

  /* "/Users/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(((PyObject *)__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_1);
  __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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_133outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_133outer_join_indexer_object = {__Pyx_NAMESTR("outer_join_indexer_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_133outer_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_133outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyObject *__pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("outer_join_indexer_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lval = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_rval = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2060
 *         ndarray[object] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2061
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2063
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2064
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2065
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2067
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2068
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2070
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L7_break;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2072
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2073
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2075
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L7_break;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2076
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2077
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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);

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2079
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2080
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2082
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __pyx_t_5 = __pyx_v_j;
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_5, __pyx_bstride_0_right);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 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_3) {

        /* "/Users/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);

        /* "/Users/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_L14;
      }

      /* "/Users/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_bstruct_left.buf, __pyx_t_7, __pyx_bstride_0_left);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __pyx_t_8 = __pyx_v_j;
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_8, __pyx_bstride_0_right);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {

        /* "/Users/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_L14;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2088
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L14:;

      /* "/Users/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_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __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[8]; __pyx_lineno = 2092; __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_6));
  PyTuple_SET_ITEM(__pyx_t_6, 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 = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = PyEval_CallObjectWithKeywords(__pyx_t_10, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __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_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2099
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2100
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2102
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2103
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2105
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L16_break;
        goto __pyx_L18;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2107
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/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_bstruct_lindexer.buf, __pyx_t_17, __pyx_bstride_0_lindexer) = -1;

          /* "/Users/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_bstruct_rindexer.buf, __pyx_t_18, __pyx_bstride_0_rindexer) = __pyx_v_j;

          /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right);
          __Pyx_INCREF((PyObject*)__pyx_t_1);
          __pyx_t_20 = __pyx_v_count;
          __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_20, __pyx_bstride_0_result);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_1);
          *__pyx_t_21 = __pyx_t_1;
          __Pyx_GIVEREF(*__pyx_t_21);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "/Users/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);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2113
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L16_break;
      }
      __pyx_L18:;
      goto __pyx_L17;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2114
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/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_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_22, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_23, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_24, __pyx_bstride_0_left);
        __Pyx_INCREF((PyObject*)__pyx_t_1);
        __pyx_t_25 = __pyx_v_count;
        __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_25, __pyx_bstride_0_result);
        __Pyx_GOTREF(*__pyx_t_21);
        __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_1);
        *__pyx_t_21 = __pyx_t_1;
        __Pyx_GIVEREF(*__pyx_t_21);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "/Users/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);

        /* "/Users/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);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2121
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L16_break;
      goto __pyx_L17;
    }
    /*else*/ {

      /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_26, __pyx_bstride_0_left);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_lval);
      __pyx_v_lval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_27, __pyx_bstride_0_right);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_rval);
      __pyx_v_rval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/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_1 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_28, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_29, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_30, __pyx_bstride_0_result);
        __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);

        /* "/Users/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);

        /* "/Users/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_L23;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2131
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_31, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_32, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_33, __pyx_bstride_0_result);
        __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);

        /* "/Users/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_L23;
      }
      /*else*/ {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_34, __pyx_bstride_0_lindexer) = -1;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_35, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_36, __pyx_bstride_0_result);
        __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);

        /* "/Users/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_L23:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2142
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L17:;
  }
  __pyx_L16_break:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2144
 *             count += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_lindexer));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __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_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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_lval);
  __Pyx_DECREF(__pyx_v_rval);
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_134outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_134outer_join_indexer_int32 = {__Pyx_NAMESTR("outer_join_indexer_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_134outer_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_134outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("outer_join_indexer_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2156
 *         ndarray[int32_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2157
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2159
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2160
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2161
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2163
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2164
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2166
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L7_break;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2168
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2169
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2171
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L7_break;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2172
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2173
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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);

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2175
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2176
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2178
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_4 = __pyx_v_j;
      __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right.buf, __pyx_t_4, __pyx_bstride_0_right)));
      if (__pyx_t_3) {

        /* "/Users/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);

        /* "/Users/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_L14;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2181
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_6 = __pyx_v_j;
      __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left.buf, __pyx_t_5, __pyx_bstride_0_left)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right)));
      if (__pyx_t_3) {

        /* "/Users/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_L14;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2184
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L14:;

      /* "/Users/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_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2195
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2196
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2198
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2199
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2201
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L16_break;
        goto __pyx_L18;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2203
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/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_bstruct_lindexer.buf, __pyx_t_17, __pyx_bstride_0_lindexer) = -1;

          /* "/Users/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_bstruct_rindexer.buf, __pyx_t_18, __pyx_bstride_0_rindexer) = __pyx_v_j;

          /* "/Users/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_bstruct_result.buf, __pyx_t_20, __pyx_bstride_0_result) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right));

          /* "/Users/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);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2209
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L16_break;
      }
      __pyx_L18:;
      goto __pyx_L17;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2210
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/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_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_21, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_22, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_24, __pyx_bstride_0_result) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left));

        /* "/Users/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);

        /* "/Users/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);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2217
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L16_break;
      goto __pyx_L17;
    }
    /*else*/ {

      /* "/Users/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_bstruct_left.buf, __pyx_t_25, __pyx_bstride_0_left));

      /* "/Users/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_bstruct_right.buf, __pyx_t_26, __pyx_bstride_0_right));

      /* "/Users/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_3 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_27, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_28, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_29, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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);

        /* "/Users/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_L23;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2227
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_3 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_30, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_31, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_32, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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_L23;
      }
      /*else*/ {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_33, __pyx_bstride_0_lindexer) = -1;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_34, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_35, __pyx_bstride_0_result) = __pyx_v_rval;

        /* "/Users/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_L23:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2238
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L17:;
  }
  __pyx_L16_break:;

  /* "/Users/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(((PyObject *)__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_1);
  __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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_135outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_135outer_join_indexer_int64 = {__Pyx_NAMESTR("outer_join_indexer_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_135outer_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_135outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("outer_join_indexer_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2252
 *         ndarray[int64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2253
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2255
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2256
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2257
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2259
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2260
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2262
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L7_break;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2264
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2265
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2267
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L7_break;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2268
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2269
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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);

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2271
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2272
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2274
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_4 = __pyx_v_j;
      __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_4, __pyx_bstride_0_right)));
      if (__pyx_t_3) {

        /* "/Users/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);

        /* "/Users/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_L14;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2277
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_6 = __pyx_v_j;
      __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_left.buf, __pyx_t_5, __pyx_bstride_0_left)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right)));
      if (__pyx_t_3) {

        /* "/Users/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_L14;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2280
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L14:;

      /* "/Users/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_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2291
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2292
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2294
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2295
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_3) {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2297
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L16_break;
        goto __pyx_L18;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2299
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_3 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_3) break;

          /* "/Users/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_bstruct_lindexer.buf, __pyx_t_17, __pyx_bstride_0_lindexer) = -1;

          /* "/Users/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_bstruct_rindexer.buf, __pyx_t_18, __pyx_bstride_0_rindexer) = __pyx_v_j;

          /* "/Users/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_bstruct_result.buf, __pyx_t_20, __pyx_bstride_0_result) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_19, __pyx_bstride_0_right));

          /* "/Users/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);

          /* "/Users/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);
        }

        /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2305
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L16_break;
      }
      __pyx_L18:;
      goto __pyx_L17;
    }

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2306
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_3) {

      /* "/Users/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_3 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_3) break;

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_21, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_22, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_24, __pyx_bstride_0_result) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_left.buf, __pyx_t_23, __pyx_bstride_0_left));

        /* "/Users/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);

        /* "/Users/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);
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2313
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L16_break;
      goto __pyx_L17;
    }
    /*else*/ {

      /* "/Users/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_bstruct_left.buf, __pyx_t_25, __pyx_bstride_0_left));

      /* "/Users/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_bstruct_right.buf, __pyx_t_26, __pyx_bstride_0_right));

      /* "/Users/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_3 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_27, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_28, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_29, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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);

        /* "/Users/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_L23;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2323
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_3 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_30, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_31, __pyx_bstride_0_rindexer) = -1;

        /* "/Users/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_bstruct_result.buf, __pyx_t_32, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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_L23;
      }
      /*else*/ {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_33, __pyx_bstride_0_lindexer) = -1;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_34, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_35, __pyx_bstride_0_result) = __pyx_v_rval;

        /* "/Users/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_L23:;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2334
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L17:;
  }
  __pyx_L16_break:;

  /* "/Users/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(((PyObject *)__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_1);
  __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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_136inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_136inner_join_indexer_float64[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_136inner_join_indexer_float64 = {__Pyx_NAMESTR("inner_join_indexer_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_136inner_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_136inner_join_indexer_float64)};
static PyObject *__pyx_pf_6pandas_8_tseries_136inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("inner_join_indexer_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2352
 *         ndarray[float64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2353
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2355
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2356
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2359
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_3) {
      __pyx_t_4 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2360
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2362
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left));

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2363
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_6 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right));

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2364
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_5 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_5) {

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L9;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2368
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_5) {

        /* "/Users/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_L9;
      }
      /*else*/ {

        /* "/Users/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_L9:;
    }
    __pyx_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2380
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2383
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_5 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_5) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_5;
    }
    if (__pyx_t_4) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2384
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L11_break;
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_left.buf, __pyx_t_17, __pyx_bstride_0_left));

      /* "/Users/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_bstruct_right.buf, __pyx_t_18, __pyx_bstride_0_right));

      /* "/Users/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_4 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_19, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_20, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_21, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L13;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2395
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/Users/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_L13;
      }
      /*else*/ {

        /* "/Users/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_L13:;
    }
    __pyx_L12:;
  }
  __pyx_L11_break:;

  /* "/Users/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(((PyObject *)__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_1);
  __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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_137inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_137inner_join_indexer_object[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_137inner_join_indexer_object = {__Pyx_NAMESTR("inner_join_indexer_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_137inner_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_137inner_join_indexer_object)};
static PyObject *__pyx_pf_6pandas_8_tseries_137inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyObject *__pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("inner_join_indexer_object");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lval = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_rval = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2415
 *         ndarray[object] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2416
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2418
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2419
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2422
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_3) {
      __pyx_t_4 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2423
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2425
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_lval);
      __pyx_v_lval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_rval);
      __pyx_v_rval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2427
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L9;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2431
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "/Users/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_L9;
      }
      /*else*/ {

        /* "/Users/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_L9:;
    }
    __pyx_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = PyEval_CallObjectWithKeywords(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __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_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __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_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2442
 *     result = np.empty(count, dtype=object)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2443
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2446
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_5 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_5) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_5;
    }
    if (__pyx_t_4) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2447
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L11_break;
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_left.buf, __pyx_t_17, __pyx_bstride_0_left);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_lval);
      __pyx_v_lval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_right.buf, __pyx_t_18, __pyx_bstride_0_right);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_DECREF(__pyx_v_rval);
      __pyx_v_rval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/Users/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_1 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_19, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_20, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_21, __pyx_bstride_0_result);
        __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);

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L13;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2458
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "/Users/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_L13;
      }
      /*else*/ {

        /* "/Users/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_L13:;
    }
    __pyx_L12:;
  }
  __pyx_L11_break:;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2463
 *                 j += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_lindexer));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __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_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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_object");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_lval);
  __Pyx_DECREF(__pyx_v_rval);
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_138inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_138inner_join_indexer_int32[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_138inner_join_indexer_int32 = {__Pyx_NAMESTR("inner_join_indexer_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_138inner_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_138inner_join_indexer_int32)};
static PyObject *__pyx_pf_6pandas_8_tseries_138inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("inner_join_indexer_int32");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2478
 *         ndarray[int32_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2479
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2481
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2482
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2485
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_3) {
      __pyx_t_4 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2486
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2488
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left));

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2489
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_6 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right));

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2490
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_5 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_5) {

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L9;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2494
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_5) {

        /* "/Users/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_L9;
      }
      /*else*/ {

        /* "/Users/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_L9:;
    }
    __pyx_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2506
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2509
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_5 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_5) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_5;
    }
    if (__pyx_t_4) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2510
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L11_break;
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_left.buf, __pyx_t_17, __pyx_bstride_0_left));

      /* "/Users/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_bstruct_right.buf, __pyx_t_18, __pyx_bstride_0_right));

      /* "/Users/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_4 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_19, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_20, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_21, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L13;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2521
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/Users/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_L13;
      }
      /*else*/ {

        /* "/Users/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_L13:;
    }
    __pyx_L12:;
  }
  __pyx_L11_break:;

  /* "/Users/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(((PyObject *)__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_1);
  __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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_int32");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_139inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_139inner_join_indexer_int64[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_139inner_join_indexer_int64 = {__Pyx_NAMESTR("inner_join_indexer_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_139inner_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_139inner_join_indexer_int64)};
static PyObject *__pyx_pf_6pandas_8_tseries_139inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  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;
  PyArrayObject *__pyx_v_rindexer;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_lindexer;
  Py_ssize_t __pyx_bstride_0_lindexer = 0;
  Py_ssize_t __pyx_bshape_0_lindexer = 0;
  Py_buffer __pyx_bstruct_rindexer;
  Py_ssize_t __pyx_bstride_0_rindexer = 0;
  Py_ssize_t __pyx_bshape_0_rindexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  __Pyx_RefNannySetupContext("inner_join_indexer_int64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_lindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rindexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_lindexer.buf = NULL;
  __pyx_bstruct_rindexer.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2541
 *         ndarray[int64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_left);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nleft = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2542
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_right);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nright = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2544
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2545
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2548
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_3 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_3) {
      __pyx_t_4 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2549
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2551
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_left.buf, __pyx_t_2, __pyx_bstride_0_left));

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2552
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_6 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_right.buf, __pyx_t_6, __pyx_bstride_0_right));

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2553
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_5 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_5) {

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L9;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2557
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_5) {

        /* "/Users/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_L9;
      }
      /*else*/ {

        /* "/Users/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_L9:;
    }
    __pyx_L8:;
  }
  __pyx_L7_break:;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 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 = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_lindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_lindexer, (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_bstruct_lindexer, (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_bstride_0_lindexer = __pyx_bstruct_lindexer.strides[0];
    __pyx_bshape_0_lindexer = __pyx_bstruct_lindexer.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_DECREF(((PyObject *)__pyx_v_lindexer));
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_1); __pyx_t_1 = 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_bstruct_rindexer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rindexer, (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_bstruct_rindexer, (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_bstride_0_rindexer = __pyx_bstruct_rindexer.strides[0];
    __pyx_bshape_0_rindexer = __pyx_bstruct_rindexer.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_DECREF(((PyObject *)__pyx_v_rindexer));
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2569
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2572
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_5 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_5) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_5;
    }
    if (__pyx_t_4) {

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2573
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L11_break;
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/Users/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_bstruct_left.buf, __pyx_t_17, __pyx_bstride_0_left));

      /* "/Users/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_bstruct_right.buf, __pyx_t_18, __pyx_bstride_0_right));

      /* "/Users/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_4 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/Users/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_bstruct_lindexer.buf, __pyx_t_19, __pyx_bstride_0_lindexer) = __pyx_v_i;

        /* "/Users/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_bstruct_rindexer.buf, __pyx_t_20, __pyx_bstride_0_rindexer) = __pyx_v_j;

        /* "/Users/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_bstruct_result.buf, __pyx_t_21, __pyx_bstride_0_result) = __pyx_v_lval;

        /* "/Users/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);

        /* "/Users/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);

        /* "/Users/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_L13;
      }

      /* "/Users/wesm/code/pandas/pandas/src/generated.pyx":2584
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/Users/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_L13;
      }
      /*else*/ {

        /* "/Users/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_L13:;
    }
    __pyx_L12:;
  }
  __pyx_L11_break:;

  /* "/Users/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(((PyObject *)__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_1);
  __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_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_lindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rindexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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
 * 
 */

static int __pyx_pf_6pandas_8_tseries_7Reducer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_7Reducer___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;
  PyObject *__pyx_v_n;
  PyObject *__pyx_v_k;
  int __pyx_r;
  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_t_6;
  Py_ssize_t __pyx_t_7;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_1);
    values[3] = ((PyObject *)Py_None);
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_axis = ((PyObject *)__pyx_int_1);
    __pyx_v_dummy = ((PyObject *)Py_None);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_dummy = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_axis = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 1);
      __pyx_v_arr = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_arr);
  __pyx_v_n = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_n);
    __pyx_v_n = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __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_2 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_EndUnpack(__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;
    __Pyx_DECREF(__pyx_v_n);
    __pyx_v_n = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "/Users/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_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 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_5) {

    /* "/Users/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_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 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_6 = (!__pyx_t_5);
    if (__pyx_t_6) {

      /* "/Users/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_L7;
    }
    __pyx_L7:;

    /* "/Users/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_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->nresults = __pyx_t_7;

    /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":21
 * 
 *             self.nresults = k
 *             self.chunksize = n             # <<<<<<<<<<<<<<
 *             self.increment = n * arr.dtype.itemsize
 *         else:
 */
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->chunksize = __pyx_t_7;

    /* "/Users/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_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_7 == (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;
    ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->increment = __pyx_t_7;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_5 = (!__pyx_t_6);
    if (__pyx_t_5) {

      /* "/Users/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_L8;
    }
    __pyx_L8:;

    /* "/Users/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_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->nresults = __pyx_t_7;

    /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":28
 * 
 *             self.nresults = n
 *             self.chunksize = k             # <<<<<<<<<<<<<<
 *             self.increment = k * arr.dtype.itemsize
 * 
 */
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->chunksize = __pyx_t_7;

    /* "/Users/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_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_7 == (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;
    ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->increment = __pyx_t_7;
  }
  __pyx_L6:;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->f);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->f);
  ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->f = __pyx_v_f;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->arr);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->arr);
  ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->arr = __pyx_v_arr;

  /* "/Users/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(__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(((PyObject *)__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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->dummy);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->dummy);
  ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_n);
  __Pyx_DECREF(__pyx_v_k);
  __Pyx_DECREF(__pyx_v_arr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_1_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_1_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
  __Pyx_RefNannySetupContext("_check_dummy");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_dummy = ((PyObject *)Py_None);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_dummy = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_dummy);

  /* "/Users/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) {

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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(((PyObject *)__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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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 = PyEval_CallObjectWithKeywords(__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_L6;
  }
  /*else*/ {

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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) {

      /* "/Users/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);
      __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_L7;
    }
    __pyx_L7:;

    /* "/Users/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_4 = __pyx_v_dummy;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = (__pyx_t_6 != ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->chunksize);
    if (__pyx_t_1) {

      /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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(((PyObject *)__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);
      __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_L8;
    }
    __pyx_L8:;
  }
  __pyx_L6:;

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_2get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_2get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  char *__pyx_v_dummy_buf;
  PyArrayObject *__pyx_v_arr;
  PyArrayObject *__pyx_v_result;
  PyArrayObject *__pyx_v_chunk;
  Py_ssize_t __pyx_v_i;
  PyArrayIterObject *__pyx_v_it;
  PyObject *__pyx_v_res;
  PyObject *__pyx_v_e;
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("get_result");
  __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_chunk = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_it = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_res = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_e = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":55
 *             object res
 * 
 *         arr = self.arr             # <<<<<<<<<<<<<<
 *         chunk = self.dummy
 * 
 */
  if (!(likely(((((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->arr) == Py_None) || likely(__Pyx_TypeTest(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->arr);
  __Pyx_DECREF(((PyObject *)__pyx_v_arr));
  __pyx_v_arr = ((PyArrayObject *)((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->arr);

  /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":56
 * 
 *         arr = self.arr
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 * 
 *         dummy_buf = chunk.data
 */
  if (!(likely(((((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->dummy) == Py_None) || likely(__Pyx_TypeTest(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__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(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->dummy);
  __Pyx_DECREF(((PyObject *)__pyx_v_chunk));
  __pyx_v_chunk = ((PyArrayObject *)((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->dummy);

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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:*/ {
    {
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
      __Pyx_XGOTREF(__pyx_save_exc_type);
      __Pyx_XGOTREF(__pyx_save_exc_value);
      __Pyx_XGOTREF(__pyx_save_exc_tb);
      /*try:*/ {

        /* "/Users/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_1 = ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->nresults;
        for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
          __pyx_v_i = __pyx_t_2;

          /* "/Users/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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_3));
          __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_chunk));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk));
          __pyx_t_4 = PyObject_Call(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->f, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_v_res);
          __pyx_v_res = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "/Users/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_5 = (__pyx_v_i == 0);
          if (__pyx_t_5) {

            /* "/Users/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_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_3));
            __Pyx_INCREF(__pyx_v_res);
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_res);
            __Pyx_GIVEREF(__pyx_v_res);
            __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L8_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;
            if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            __Pyx_DECREF(((PyObject *)__pyx_v_result));
            __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
            __pyx_t_6 = 0;

            /* "/Users/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_6 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_6)));
            __Pyx_DECREF(((PyObject *)__pyx_v_it));
            __pyx_v_it = ((PyArrayIterObject *)__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            goto __pyx_L18;
          }
          __pyx_L18:;

          /* "/Users/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)
 */
          PyArray_SETITEM(__pyx_v_result, PyArray_ITER_DATA(__pyx_v_it), __pyx_v_res);

          /* "/Users/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 + ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->increment);

          /* "/Users/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_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L15_try_end;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "/Users/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_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas._tseries.Reducer.get_result");
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_v_e);
        __pyx_v_e = __pyx_t_3;

        /* "/Users/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_8 = ((PyObject *)__pyx_n_s__args);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_5 = PyObject_HasAttr(__pyx_v_e, __pyx_t_8); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_5) {

          /* "/Users/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_8 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__args); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_10));
          PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_9 = PyNumber_Add(__pyx_t_8, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
          if (PyObject_SetAttr(__pyx_v_e, __pyx_n_s__args, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L21;
        }
        __pyx_L21:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L9_exception_handled;
      }
      __pyx_L10_except_error:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      goto __pyx_L6;
      __pyx_L9_exception_handled:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      __pyx_L15_try_end:;
    }
  }

  /* "/Users/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_L7;
    __pyx_L6: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L7;
    }
    __pyx_L7:;
    __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;
      }
    }
  }

  /* "/Users/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
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __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[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); 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_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __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_6); __pyx_t_6 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "/Users/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_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 77; __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[9]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 77; __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;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __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_4);
    __pyx_t_4 = 0;
    goto __pyx_L23;
  }
  __pyx_L23:;

  /* "/Users/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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas._tseries.Reducer.get_result");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_arr);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF((PyObject *)__pyx_v_chunk);
  __Pyx_DECREF((PyObject *)__pyx_v_it);
  __Pyx_DECREF(__pyx_v_res);
  __Pyx_DECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_3_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_3_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("_get_result_array");
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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)))
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/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_1 = __pyx_v_res;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_1, __pyx_t_2); 
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __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 = 82; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      }
      #endif

      /* "/Users/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_2 = __pyx_v_res;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_1 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_2, __pyx_t_1); 
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {
        __pyx_t_1 = __pyx_v_res;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->dummy;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = (__pyx_t_4 == __pyx_t_5);
        __pyx_t_7 = __pyx_t_6;
      } else {
        __pyx_t_7 = __pyx_t_3;
      }
      if (unlikely(!(!__pyx_t_7))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      }
      #endif

      /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_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[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self)->nresults); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      PyTuple_SET_ITEM(__pyx_t_8, 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[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __pyx_t_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "/Users/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_L5_error;}
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "/Users/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_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pandas._tseries.Reducer._get_result_array");
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_8);

      /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":88
 *             result[0] = res
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_64), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L12_try_end:;
  }

  /* "/Users/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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._tseries.Reducer._get_result_array");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper___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;
  Py_ssize_t __pyx_v_n;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[5] = {0,0,0,0,0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_series = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_labels = PyTuple_GET_ITEM(__pyx_args, 2);
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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 = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_series);

  /* "/Users/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 = __pyx_v_series;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels = __pyx_v_labels;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f = __pyx_v_f;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 109; __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 = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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) {

    /* "/Users/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_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 110; __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_series);
    __pyx_v_series = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr = __pyx_v_series;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 114; __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 = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1, ((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_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "/Users/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);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->passed_dummy = __pyx_t_5;

  /* "/Users/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):
 */
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->ngroups = __pyx_v_ngroups;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_series);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
  __Pyx_RefNannySetupContext("_check_dummy");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_dummy = ((PyObject *)Py_None);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_dummy = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_dummy);

  /* "/Users/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) {

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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 = PyEval_CallObjectWithKeywords(__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_L6;
  }
  /*else*/ {

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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) {

      /* "/Users/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);
      __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_L7;
    }
    __pyx_L7:;

    /* "/Users/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) {

      /* "/Users/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_L8;
    }
    __pyx_L8:;
  }
  __pyx_L6:;

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_2get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_2get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyArrayObject *__pyx_v_result;
  PyArrayObject *__pyx_v_labels;
  PyArrayObject *__pyx_v_counts;
  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;
  PyObject *__pyx_v_chunk;
  int __pyx_v_initialized;
  struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_vslider;
  struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_islider;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("get_result");
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_res = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_chunk = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_vslider = ((struct __pyx_obj_6pandas_8_tseries_Slider *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_islider = ((struct __pyx_obj_6pandas_8_tseries_Slider *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;

  /* "/Users/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;

  /* "/Users/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(((((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels) == Py_None) || likely(__Pyx_TypeTest(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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 *)((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
    __pyx_bshape_0_labels = __pyx_bstruct_labels.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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  __Pyx_DECREF(((PyObject *)__pyx_v_labels));
  __pyx_v_labels = ((PyArrayObject *)((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_counts);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.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_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  __Pyx_DECREF(__pyx_v_chunk);
  __pyx_v_chunk = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy;

  /* "/Users/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;

  /* "/Users/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 = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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;

  /* "/Users/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(((PyObject *)__pyx_t_9));
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  PyTuple_SET_ITEM(__pyx_t_9, 0, ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  __Pyx_GIVEREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  PyTuple_SET_ITEM(__pyx_t_9, 1, ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  __Pyx_GIVEREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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_DECREF(((PyObject *)__pyx_v_vslider));
  __pyx_v_vslider = ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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(((PyObject *)__pyx_t_9));
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  PyTuple_SET_ITEM(__pyx_t_9, 0, ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  __Pyx_GIVEREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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_DECREF(((PyObject *)__pyx_v_islider));
  __pyx_v_islider = ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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:*/ {
    {
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
      __Pyx_XGOTREF(__pyx_save_exc_type);
      __Pyx_XGOTREF(__pyx_save_exc_value);
      __Pyx_XGOTREF(__pyx_save_exc_tb);
      /*try:*/ {

        /* "/Users/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;

          /* "/Users/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);

          /* "/Users/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_bshape_0_labels;
            if (unlikely(__pyx_t_12 < 0)) __pyx_t_2 = 0;
          } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_labels)) __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_L8_error;}
          }
          __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_12, __pyx_bstride_0_labels));

          /* "/Users/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_bshape_0_labels;
              if (unlikely(__pyx_t_14 < 0)) __pyx_t_2 = 0;
            } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_labels)) __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_L8_error;}
            }
            __pyx_t_15 = (__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_14, __pyx_bstride_0_labels)));
            __pyx_t_16 = __pyx_t_15;
          } else {
            __pyx_t_16 = __pyx_t_13;
          }
          if (__pyx_t_16) {

            /* "/Users/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) {

              /* "/Users/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 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_islider->__pyx_vtab)->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_L8_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "/Users/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 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_vslider->__pyx_vtab)->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_L8_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "/Users/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;

              /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":158
 *                         vslider.advance(group_size)
 *                         group_size = 0
 *                         continue             # <<<<<<<<<<<<<<
 * 
 *                     islider.set_length(group_size)
 */
              goto __pyx_L16_continue;
              goto __pyx_L19;
            }
            __pyx_L19:;

            /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":160
 *                         continue
 * 
 *                     islider.set_length(group_size)             # <<<<<<<<<<<<<<
 *                     vslider.set_length(group_size)
 * 
 */
            __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_islider->__pyx_vtab)->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_L8_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "/Users/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 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_vslider->__pyx_vtab)->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_L8_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "/Users/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_L8_error;}
            __Pyx_GOTREF(((PyObject *)__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(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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_L8_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "/Users/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) {

              /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":166
 * 
 *                     if not initialized:
 *                         result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                         initialized = 1
 * 
 */
              __pyx_t_9 = PyObject_GetAttr(__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_L8_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_L8_error;}
              __Pyx_GOTREF(((PyObject *)__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_L8_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_L8_error;}
              __Pyx_DECREF(((PyObject *)__pyx_v_result));
              __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
              __pyx_t_8 = 0;

              /* "/Users/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_L20;
            }
            __pyx_L20:;

            /* "/Users/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)
 */
            __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_L8_error;}

            /* "/Users/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_bshape_0_counts;
              if (unlikely(__pyx_t_17 < 0)) __pyx_t_2 = 0;
            } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_counts)) __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_L8_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_17, __pyx_bstride_0_counts) = __pyx_v_group_size;

            /* "/Users/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 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_islider->__pyx_vtab)->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_L8_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "/Users/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 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_vslider->__pyx_vtab)->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_L8_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":174
 *                     vslider.advance(group_size)
 * 
 *                     group_size = 0             # <<<<<<<<<<<<<<
 *         except:
 *             raise
 */
            __pyx_v_group_size = 0;
            goto __pyx_L18;
          }
          __pyx_L18:;
          __pyx_L16_continue:;
        }
      }
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L15_try_end;
      __pyx_L8_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;

      /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":175
 * 
 *                     group_size = 0
 *         except:             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
      /*except:*/ {
        __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.get_result");
        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_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_9);

        /* "/Users/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_L10_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_L9_exception_handled;
      }
      __pyx_L10_except_error:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      goto __pyx_L6;
      __pyx_L9_exception_handled:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      __pyx_L15_try_end:;
    }
  }

  /* "/Users/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_L7;
    __pyx_L6: {
      __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_L7;
    }
    __pyx_L7:;
    __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_islider->__pyx_vtab)->cleanup(__pyx_v_islider); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "/Users/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 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Slider *)__pyx_v_vslider->__pyx_vtab)->cleanup(__pyx_v_vslider); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L24;
    __pyx_L23_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_L24:;
    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;
      }
    }
  }

  /* "/Users/wesm/code/pandas/pandas/src/reduce.pyx":182
 *             vslider.cleanup()
 * 
 *         if result.dtype == np.object_:             # <<<<<<<<<<<<<<
 *             result = maybe_convert_objects(result)
 * 
 */
  __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) {

    /* "/Users/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(((PyObject *)__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_L25;
  }
  __pyx_L25:;

  /* "/Users/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(((PyObject *)__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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.get_result");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF(__pyx_v_res);
  __Pyx_DECREF(__pyx_v_chunk);
  __Pyx_DECREF((PyObject *)__pyx_v_vslider);
  __Pyx_DECREF((PyObject *)__pyx_v_islider);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_3_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_3_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("_get_result_array");
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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)))
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/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_1 = __pyx_v_res;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_1, __pyx_t_2); 
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __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 = 189; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      }
      #endif

      /* "/Users/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_2 = __pyx_v_res;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_1 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_2, __pyx_t_1); 
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {
        __pyx_t_1 = __pyx_v_res;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = (__pyx_t_4 == __pyx_t_5);
        __pyx_t_7 = __pyx_t_6;
      } else {
        __pyx_t_7 = __pyx_t_3;
      }
      if (unlikely(!(!__pyx_t_7))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      }
      #endif

      /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_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[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->ngroups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      PyTuple_SET_ITEM(__pyx_t_8, 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[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __pyx_t_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_9;
      __pyx_t_9 = 0;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "/Users/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_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pandas._tseries.SeriesGrouper._get_result_array");
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_8);

      /* "/Users/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_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L12_try_end:;
  }

  /* "/Users/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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper._get_result_array");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr = __pyx_v_value;

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

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->arr = Py_None;

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

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index = __pyx_v_value;

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

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->index = Py_None;

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

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy = __pyx_v_value;

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

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->dummy = Py_None;

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

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f = __pyx_v_value;

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

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->f = Py_None;

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

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__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;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels = __pyx_v_value;

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

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self)->labels = Py_None;

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

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_6Slider___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_buf = 0;
  int __pyx_r;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__buf,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_buf = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_values);

  /* "/Users/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

  /* "/Users/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) {

    /* "/Users/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_L6;
  }
  __pyx_L6:;

  /* "/Users/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

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->values);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->values));
  ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->values = ((PyArrayObject *)__pyx_v_values);

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->buf);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->buf));
  ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->buf = ((PyArrayObject *)__pyx_v_buf);

  /* "/Users/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;
  ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->stride = __pyx_t_6;

  /* "/Users/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]
 * 
 */
  ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->orig_data = ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->buf->data;

  /* "/Users/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
 */
  ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->orig_len = (((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->buf->dimensions[0]);

  /* "/Users/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):
 */
  ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self)->buf->data = ((struct __pyx_obj_6pandas_8_tseries_Slider *)__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_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_RefNannySetupContext("advance");

  /* "/Users/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 = (__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;
}

/* "/Users/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_RefNannySetupContext("set_length");

  /* "/Users/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;
}

/* "/Users/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_RefNannySetupContext("cleanup");

  /* "/Users/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;

  /* "/Users/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;
}

/* "/Users/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()
 */

static PyObject *__pyx_pf_6pandas_8_tseries_140reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_140reduce = {__Pyx_NAMESTR("reduce"), (PyCFunction)__pyx_pf_6pandas_8_tseries_140reduce, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_140reduce(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;
  PyObject *__pyx_v_reducer;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,0};
  __Pyx_RefNannySetupContext("reduce");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)Py_None);
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_axis = ((PyObject *)__pyx_int_0);
    __pyx_v_dummy = ((PyObject *)Py_None);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_dummy = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_axis = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 1);
      __pyx_v_arr = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_reducer = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(((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_DECREF(__pyx_v_reducer);
  __pyx_v_reducer = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/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(__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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_reducer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":5
 * cimport util
 * 
 * def rank_1d_float64(object in_arr):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */

static PyObject *__pyx_pf_6pandas_8_tseries_141rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_v_in_arr); /*proto*/
static char __pyx_doc_6pandas_8_tseries_141rank_1d_float64[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_141rank_1d_float64 = {__Pyx_NAMESTR("rank_1d_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_141rank_1d_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_141rank_1d_float64)};
static PyObject *__pyx_pf_6pandas_8_tseries_141rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_v_in_arr) {
  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;
  PyArrayObject *__pyx_v_ranks;
  PyArrayObject *__pyx_v_values;
  PyArrayObject *__pyx_v_argsorted;
  __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;
  PyObject *__pyx_v_mask;
  PyObject *__pyx_v__as;
  Py_buffer __pyx_bstruct_sorted_data;
  Py_ssize_t __pyx_bstride_0_sorted_data = 0;
  Py_ssize_t __pyx_bshape_0_sorted_data = 0;
  Py_buffer __pyx_bstruct_ranks;
  Py_ssize_t __pyx_bstride_0_ranks = 0;
  Py_ssize_t __pyx_bshape_0_ranks = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_argsorted;
  Py_ssize_t __pyx_bstride_0_argsorted = 0;
  Py_ssize_t __pyx_bshape_0_argsorted = 0;
  PyObject *__pyx_r = NULL;
  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;
  __pyx_t_5numpy_float64_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  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;
  __pyx_t_5numpy_int64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __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;
  __Pyx_RefNannySetupContext("rank_1d_float64");
  __pyx_self = __pyx_self;
  __pyx_v_sorted_data = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_ranks = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_argsorted = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_mask = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v__as = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_sorted_data.buf = NULL;
  __pyx_bstruct_ranks.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_argsorted.buf = NULL;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":11
 * 
 *     cdef:
 *         Py_ssize_t i, j, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t] sorted_data, ranks, values
 *         ndarray[int64_t] argsorted
 */
  __pyx_v_dups = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":16
 *         int32_t idx
 *         float64_t val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 * 
 *     values = np.asarray(in_arr).copy()
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":18
 *         float64_t sum_ranks = 0
 * 
 *     values = np.asarray(in_arr).copy()             # <<<<<<<<<<<<<<
 * 
 *     nan_value = np.inf
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__asarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __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[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __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_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__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[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
    __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_values));
  __pyx_v_values = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":20
 *     values = np.asarray(in_arr).copy()
 * 
 *     nan_value = np.inf             # <<<<<<<<<<<<<<
 *     mask = np.isnan(values)
 *     np.putmask(values, mask, nan_value)
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nan_value = __pyx_t_9;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":21
 * 
 *     nan_value = np.inf
 *     mask = np.isnan(values)             # <<<<<<<<<<<<<<
 *     np.putmask(values, mask, nan_value)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isnan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __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[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __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_DECREF(__pyx_v_mask);
  __pyx_v_mask = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":22
 *     nan_value = np.inf
 *     mask = np.isnan(values)
 *     np.putmask(values, mask, nan_value)             # <<<<<<<<<<<<<<
 * 
 *     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 = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mask);
  __Pyx_GIVEREF(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __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[0]; __pyx_lineno = 22; __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;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":24
 *     np.putmask(values, mask, nan_value)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     ranks = np.empty(n, dtype='f8')
 * 
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":25
 * 
 *     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 = 25; __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[0]; __pyx_lineno = 25; __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[0]; __pyx_lineno = 25; __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[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __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 = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_11);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_ranks, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_ranks, (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_bstride_0_ranks = __pyx_bstruct_ranks.strides[0];
    __pyx_bshape_0_ranks = __pyx_bstruct_ranks.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_ranks));
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":28
 * 
 *     # py2.5/win32 hack, can't pass i8
 *     _as = values.argsort()             # <<<<<<<<<<<<<<
 *     sorted_data = values.take(_as)
 * 
 */
  __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_v__as);
  __pyx_v__as = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":29
 *     # py2.5/win32 hack, can't pass i8
 *     _as = values.argsort()
 *     sorted_data = values.take(_as)             # <<<<<<<<<<<<<<
 * 
 *     argsorted = _as.astype('i8')
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  __Pyx_INCREF(__pyx_v__as);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v__as);
  __Pyx_GIVEREF(__pyx_v__as);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __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_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 = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sorted_data);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_sorted_data, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_sorted_data, (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_bstride_0_sorted_data = __pyx_bstruct_sorted_data.strides[0];
    __pyx_bshape_0_sorted_data = __pyx_bstruct_sorted_data.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_sorted_data));
  __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":31
 *     sorted_data = values.take(_as)
 * 
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_11);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_argsorted, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_argsorted, (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_bstride_0_argsorted = __pyx_bstruct_argsorted.strides[0];
    __pyx_bshape_0_argsorted = __pyx_bstruct_argsorted.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_argsorted));
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":33
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         sum_ranks += i + 1
 *         dups += 1
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_10; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":34
 * 
 *     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));

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":35
 *     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);

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":36
 *         sum_ranks += i + 1
 *         dups += 1
 *         val = sorted_data[i]             # <<<<<<<<<<<<<<
 *         if val == nan_value:
 *             ranks[argsorted[i]] = nan
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_bshape_0_sorted_data;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_sorted_data)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sorted_data.buf, __pyx_t_14, __pyx_bstride_0_sorted_data));

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":37
 *         dups += 1
 *         val = sorted_data[i]
 *         if val == nan_value:             # <<<<<<<<<<<<<<
 *             ranks[argsorted[i]] = nan
 *             continue
 */
    __pyx_t_15 = (__pyx_v_val == __pyx_v_nan_value);
    if (__pyx_t_15) {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":38
 *         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_16 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_bshape_0_argsorted;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_argsorted)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_17 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_16, __pyx_bstride_0_argsorted));
      __pyx_t_5 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_bshape_0_ranks;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_ranks)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_17, __pyx_bstride_0_ranks) = __pyx_v_6pandas_8_tseries_nan;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":39
 *         if val == nan_value:
 *             ranks[argsorted[i]] = nan
 *             continue             # <<<<<<<<<<<<<<
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 *             for j in range(i - dups + 1, i + 1):
 */
      goto __pyx_L5_continue;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":40
 *             ranks[argsorted[i]] = nan
 *             continue
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:             # <<<<<<<<<<<<<<
 *             for j in range(i - dups + 1, i + 1):
 *                 ranks[argsorted[j]] = sum_ranks / dups
 */
    __pyx_t_15 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_15) {
      __pyx_t_18 = (__pyx_v_i + 1);
      __pyx_t_5 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_bshape_0_sorted_data;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_sorted_data)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_19 = (fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_sorted_data.buf, __pyx_t_18, __pyx_bstride_0_sorted_data)) - __pyx_v_val)) > __pyx_v_6pandas_8_tseries_FP_ERR);
      __pyx_t_20 = __pyx_t_19;
    } else {
      __pyx_t_20 = __pyx_t_15;
    }
    if (__pyx_t_20) {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":41
 *             continue
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 *             for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                 ranks[argsorted[j]] = sum_ranks / dups
 *             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;

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":42
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 *             for j in range(i - dups + 1, i + 1):
 *                 ranks[argsorted[j]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *             sum_ranks = dups = 0
 *     return ranks
 */
        if (unlikely(__pyx_v_dups == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_23 = __pyx_v_j;
        __pyx_t_5 = -1;
        if (__pyx_t_23 < 0) {
          __pyx_t_23 += __pyx_bshape_0_argsorted;
          if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_23 >= __pyx_bshape_0_argsorted)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_23, __pyx_bstride_0_argsorted));
        __pyx_t_5 = -1;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_bshape_0_ranks;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_24 >= __pyx_bshape_0_ranks)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_24, __pyx_bstride_0_ranks) = (__pyx_v_sum_ranks / __pyx_v_dups);
      }

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":43
 *             for j in range(i - dups + 1, i + 1):
 *                 ranks[argsorted[j]] = sum_ranks / dups
 *             sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 *     return ranks
 * 
 */
      __pyx_v_sum_ranks = 0;
      __pyx_v_dups = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;
    __pyx_L5_continue:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":44
 *                 ranks[argsorted[j]] = sum_ranks / dups
 *             sum_ranks = dups = 0
 *     return ranks             # <<<<<<<<<<<<<<
 * 
 * def rank_2d_float64(object in_arr, axis=0):
 */
  __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_3);
  __Pyx_XDECREF(__pyx_t_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sorted_data);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_1d_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_sorted_data);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_sorted_data);
  __Pyx_DECREF((PyObject *)__pyx_v_ranks);
  __Pyx_DECREF((PyObject *)__pyx_v_values);
  __Pyx_DECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_DECREF(__pyx_v_mask);
  __Pyx_DECREF(__pyx_v__as);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":46
 *     return ranks
 * 
 * def rank_2d_float64(object in_arr, axis=0):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */

static PyObject *__pyx_pf_6pandas_8_tseries_142rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_142rank_2d_float64[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_142rank_2d_float64 = {__Pyx_NAMESTR("rank_2d_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_142rank_2d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_142rank_2d_float64)};
static PyObject *__pyx_pf_6pandas_8_tseries_142rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_axis = 0;
  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;
  PyArrayObject *__pyx_v_values;
  PyArrayObject *__pyx_v_argsorted;
  __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;
  Py_buffer __pyx_bstruct_ranks;
  Py_ssize_t __pyx_bstride_0_ranks = 0;
  Py_ssize_t __pyx_bstride_1_ranks = 0;
  Py_ssize_t __pyx_bshape_0_ranks = 0;
  Py_ssize_t __pyx_bshape_1_ranks = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  Py_buffer __pyx_bstruct_argsorted;
  Py_ssize_t __pyx_bstride_0_argsorted = 0;
  Py_ssize_t __pyx_bstride_1_argsorted = 0;
  Py_ssize_t __pyx_bshape_0_argsorted = 0;
  Py_ssize_t __pyx_bshape_1_argsorted = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  __pyx_t_5numpy_float64_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __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;
  Py_ssize_t __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;
  Py_ssize_t __pyx_t_24;
  int __pyx_t_25;
  int __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;
  __pyx_t_5numpy_int64_t __pyx_t_32;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,0};
  __Pyx_RefNannySetupContext("rank_2d_float64");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "rank_2d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_axis = values[1];
  } else {
    __pyx_v_axis = ((PyObject *)__pyx_int_0);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_axis = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_in_arr = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_2d_float64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_2d_float64");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_in_arr);
  __pyx_v_ranks = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_argsorted = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_ranks.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_argsorted.buf = NULL;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":52
 * 
 *     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;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":57
 *         int32_t idx
 *         float64_t val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 * 
 *     in_arr = np.asarray(in_arr)
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":59
 *         float64_t sum_ranks = 0
 * 
 *     in_arr = np.asarray(in_arr)             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__asarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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_v_in_arr);
  __pyx_v_in_arr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":61
 *     in_arr = np.asarray(in_arr)
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         values = in_arr.T.copy()
 *     else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":62
 * 
 *     if axis == 0:
 *         values = in_arr.T.copy()             # <<<<<<<<<<<<<<
 *     else:
 *         values = in_arr.copy()
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __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[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__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[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
      __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":64
 *         values = in_arr.T.copy()
 *     else:
 *         values = in_arr.copy()             # <<<<<<<<<<<<<<
 * 
 *     nan_value = np.inf
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
      __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":66
 *         values = in_arr.copy()
 * 
 *     nan_value = np.inf             # <<<<<<<<<<<<<<
 *     np.putmask(values, np.isnan(values), nan_value)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nan_value = __pyx_t_10;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":67
 * 
 *     nan_value = np.inf
 *     np.putmask(values, np.isnan(values), nan_value)             # <<<<<<<<<<<<<<
 * 
 *     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[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__putmask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__isnan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __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_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_11 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":69
 *     np.putmask(values, np.isnan(values), nan_value)
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     ranks = np.empty((n, k), dtype='f8')
 *     argsorted = values.argsort(1).astype('i8')
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
    PyObject* tuple = __pyx_t_3;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    __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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_n = __pyx_t_12;
    __pyx_v_k = __pyx_t_13;
  } else {
    __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_11, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_EndUnpack(__pyx_t_11, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_n = __pyx_t_13;
    __pyx_v_k = __pyx_t_12;
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":70
 * 
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')             # <<<<<<<<<<<<<<
 *     argsorted = values.argsort(1).astype('i8')
 *     values.sort(axis=1)
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __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[0]; __pyx_lineno = 70; __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[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 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 = 70; __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 = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __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_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 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 = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_ranks, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_bstruct_ranks, (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_bstride_0_ranks = __pyx_bstruct_ranks.strides[0]; __pyx_bstride_1_ranks = __pyx_bstruct_ranks.strides[1];
    __pyx_bshape_0_ranks = __pyx_bstruct_ranks.shape[0]; __pyx_bshape_1_ranks = __pyx_bstruct_ranks.shape[1];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_ranks));
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":71
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')
 *     argsorted = values.argsort(1).astype('i8')             # <<<<<<<<<<<<<<
 *     values.sort(axis=1)
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_11);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_argsorted, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_argsorted, (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_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_bstride_0_argsorted = __pyx_bstruct_argsorted.strides[0]; __pyx_bstride_1_argsorted = __pyx_bstruct_argsorted.strides[1];
    __pyx_bshape_0_argsorted = __pyx_bstruct_argsorted.shape[0]; __pyx_bshape_1_argsorted = __pyx_bstruct_argsorted.shape[1];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_14 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_argsorted));
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":72
 *     ranks = np.empty((n, k), dtype='f8')
 *     argsorted = values.argsort(1).astype('i8')
 *     values.sort(axis=1)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__sort); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__axis), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":74
 *     values.sort(axis=1)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         dups = sum_ranks = 0
 *         for j in range(k):
 */
  __pyx_t_12 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":75
 * 
 *     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;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":76
 *     for i in range(n):
 *         dups = sum_ranks = 0
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             sum_ranks += j + 1
 *             dups += 1
 */
    __pyx_t_15 = __pyx_v_k;
    for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
      __pyx_v_j = __pyx_t_16;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":77
 *         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));

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":78
 *         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);

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":79
 *             sum_ranks += j + 1
 *             dups += 1
 *             val = values[i, j]             # <<<<<<<<<<<<<<
 *             if val == nan_value:
 *                 ranks[i, argsorted[i, j]] = nan
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_18 = __pyx_v_j;
      __pyx_t_6 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_bshape_0_values;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_values)) __pyx_t_6 = 0;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_bshape_1_values;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_6 = 1;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_1_values)) __pyx_t_6 = 1;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_17, __pyx_bstride_0_values, __pyx_t_18, __pyx_bstride_1_values));

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":80
 *             dups += 1
 *             val = values[i, j]
 *             if val == nan_value:             # <<<<<<<<<<<<<<
 *                 ranks[i, argsorted[i, j]] = nan
 *                 continue
 */
      __pyx_t_4 = (__pyx_v_val == __pyx_v_nan_value);
      if (__pyx_t_4) {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":81
 *             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_19 = __pyx_v_i;
        __pyx_t_20 = __pyx_v_j;
        __pyx_t_6 = -1;
        if (__pyx_t_19 < 0) {
          __pyx_t_19 += __pyx_bshape_0_argsorted;
          if (unlikely(__pyx_t_19 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_argsorted)) __pyx_t_6 = 0;
        if (__pyx_t_20 < 0) {
          __pyx_t_20 += __pyx_bshape_1_argsorted;
          if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_20 >= __pyx_bshape_1_argsorted)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_22 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_19, __pyx_bstride_0_argsorted, __pyx_t_20, __pyx_bstride_1_argsorted));
        __pyx_t_6 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_21 += __pyx_bshape_0_ranks;
          if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_ranks)) __pyx_t_6 = 0;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_bshape_1_ranks;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_22 >= __pyx_bshape_1_ranks)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_21, __pyx_bstride_0_ranks, __pyx_t_22, __pyx_bstride_1_ranks) = __pyx_v_6pandas_8_tseries_nan;

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":82
 *             if val == nan_value:
 *                 ranks[i, argsorted[i, j]] = nan
 *                 continue             # <<<<<<<<<<<<<<
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 for z in range(j - dups + 1, j + 1):
 */
        goto __pyx_L9_continue;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":83
 *                 ranks[i, argsorted[i, j]] = nan
 *                 continue
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:             # <<<<<<<<<<<<<<
 *                 for z in range(j - dups + 1, j + 1):
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups
 */
      __pyx_t_4 = (__pyx_v_j == (__pyx_v_k - 1));
      if (!__pyx_t_4) {
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_24 = (__pyx_v_j + 1);
        __pyx_t_6 = -1;
        if (__pyx_t_23 < 0) {
          __pyx_t_23 += __pyx_bshape_0_values;
          if (unlikely(__pyx_t_23 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_23 >= __pyx_bshape_0_values)) __pyx_t_6 = 0;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_bshape_1_values;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_24 >= __pyx_bshape_1_values)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_25 = (fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_23, __pyx_bstride_0_values, __pyx_t_24, __pyx_bstride_1_values)) - __pyx_v_val)) > __pyx_v_6pandas_8_tseries_FP_ERR);
        __pyx_t_26 = __pyx_t_25;
      } else {
        __pyx_t_26 = __pyx_t_4;
      }
      if (__pyx_t_26) {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":84
 *                 continue
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 sum_ranks = dups = 0
 */
        __pyx_t_27 = (__pyx_v_j + 1);
        for (__pyx_t_28 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_28 < __pyx_t_27; __pyx_t_28+=1) {
          __pyx_v_z = __pyx_t_28;

          /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":85
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 for z in range(j - dups + 1, j + 1):
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *                 sum_ranks = dups = 0
 * 
 */
          if (unlikely(__pyx_v_dups == 0)) {
            PyErr_Format(PyExc_ZeroDivisionError, "float division");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_29 = __pyx_v_i;
          __pyx_t_30 = __pyx_v_z;
          __pyx_t_6 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_bshape_0_argsorted;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_6 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_bshape_0_argsorted)) __pyx_t_6 = 0;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_bshape_1_argsorted;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_6 = 1;
          } else if (unlikely(__pyx_t_30 >= __pyx_bshape_1_argsorted)) __pyx_t_6 = 1;
          if (unlikely(__pyx_t_6 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_6);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_31 = __pyx_v_i;
          __pyx_t_32 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_29, __pyx_bstride_0_argsorted, __pyx_t_30, __pyx_bstride_1_argsorted));
          __pyx_t_6 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_bshape_0_ranks;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_6 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_bshape_0_ranks)) __pyx_t_6 = 0;
          if (__pyx_t_32 < 0) {
            __pyx_t_32 += __pyx_bshape_1_ranks;
            if (unlikely(__pyx_t_32 < 0)) __pyx_t_6 = 1;
          } else if (unlikely(__pyx_t_32 >= __pyx_bshape_1_ranks)) __pyx_t_6 = 1;
          if (unlikely(__pyx_t_6 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_6);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_31, __pyx_bstride_0_ranks, __pyx_t_32, __pyx_bstride_1_ranks) = (__pyx_v_sum_ranks / __pyx_v_dups);
        }

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":86
 *                 for z in range(j - dups + 1, j + 1):
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
        __pyx_v_sum_ranks = 0;
        __pyx_v_dups = 0;
        goto __pyx_L12;
      }
      __pyx_L12:;
      __pyx_L9_continue:;
    }
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":88
 *                 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 = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_26) {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":89
 * 
 *     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 = 89; __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_L15;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":91
 *         return ranks.T
 *     else:
 *         return ranks             # <<<<<<<<<<<<<<
 * 
 * def rank_1d_generic(object in_arr, bint retry=1):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
    __pyx_r = ((PyObject *)__pyx_v_ranks);
    goto __pyx_L0;
  }
  __pyx_L15:;

  __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_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_2d_float64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_ranks);
  __Pyx_DECREF((PyObject *)__pyx_v_values);
  __Pyx_DECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_DECREF(__pyx_v_in_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":93
 *         return ranks
 * 
 * def rank_1d_generic(object in_arr, bint retry=1):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */

static PyObject *__pyx_pf_6pandas_8_tseries_143rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_143rank_1d_generic[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_143rank_1d_generic = {__Pyx_NAMESTR("rank_1d_generic"), (PyCFunction)__pyx_pf_6pandas_8_tseries_143rank_1d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_143rank_1d_generic)};
static PyObject *__pyx_pf_6pandas_8_tseries_143rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  int __pyx_v_retry;
  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;
  PyArrayObject *__pyx_v_sorted_data;
  PyArrayObject *__pyx_v_values;
  PyArrayObject *__pyx_v_argsorted;
  PyObject *__pyx_v_val;
  PyObject *__pyx_v_nan_value;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  PyObject *__pyx_v_mask;
  PyObject *__pyx_v__as;
  PyObject *__pyx_v_valid_locs;
  Py_buffer __pyx_bstruct_ranks;
  Py_ssize_t __pyx_bstride_0_ranks = 0;
  Py_ssize_t __pyx_bshape_0_ranks = 0;
  Py_buffer __pyx_bstruct_argsorted;
  Py_ssize_t __pyx_bstride_0_argsorted = 0;
  Py_ssize_t __pyx_bshape_0_argsorted = 0;
  PyObject *__pyx_r = NULL;
  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;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  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;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __pyx_t_5numpy_int64_t __pyx_t_19;
  int __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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__retry,0};
  __Pyx_RefNannySetupContext("rank_1d_generic");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "rank_1d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __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 = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_retry = ((int)1);
    }
  } else {
    __pyx_v_retry = ((int)1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_retry = __Pyx_PyObject_IsTrue(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_retry == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      case  1: __pyx_v_in_arr = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_1d_generic", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_1d_generic");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_ranks = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_sorted_data = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_argsorted = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_nan_value = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_mask = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v__as = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_valid_locs = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_ranks.buf = NULL;
  __pyx_bstruct_argsorted.buf = NULL;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":99
 * 
 *     cdef:
 *         Py_ssize_t i, j, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t] ranks
 *         ndarray sorted_data, values
 */
  __pyx_v_dups = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":105
 *         int32_t idx
 *         object val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 * 
 *     values = np.array(in_arr, copy=True)
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":107
 *         float64_t sum_ranks = 0
 * 
 *     values = np.array(in_arr, copy=True)             # <<<<<<<<<<<<<<
 * 
 *     if values.dtype != np.object_:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __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[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__copy), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __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_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[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_values));
  __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":109
 *     values = np.array(in_arr, copy=True)
 * 
 *     if values.dtype != np.object_:             # <<<<<<<<<<<<<<
 *         values = values.astype('O')
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __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[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__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_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __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_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":110
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     nan_value = Infinity() # always greater than everything
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":112
 *         values = values.astype('O')
 * 
 *     nan_value = Infinity() # always greater than everything             # <<<<<<<<<<<<<<
 *     mask = isnullobj(values)
 *     np.putmask(values, mask, nan_value)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Infinity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_nan_value);
  __pyx_v_nan_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":113
 * 
 *     nan_value = Infinity() # always greater than everything
 *     mask = isnullobj(values)             # <<<<<<<<<<<<<<
 *     np.putmask(values, mask, nan_value)
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __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[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __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;
  __Pyx_DECREF(__pyx_v_mask);
  __pyx_v_mask = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":114
 *     nan_value = Infinity() # always greater than everything
 *     mask = isnullobj(values)
 *     np.putmask(values, mask, nan_value)             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__putmask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __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(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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);
  __Pyx_INCREF(__pyx_v_nan_value);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_nan_value);
  __Pyx_GIVEREF(__pyx_v_nan_value);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":116
 *     np.putmask(values, mask, nan_value)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     ranks = np.empty(n, dtype='f8')
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_6;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":117
 * 
 *     n = len(values)
 *     ranks = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     # py2.5/win32 hack, can't pass i8
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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[0]; __pyx_lineno = 117; __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[0]; __pyx_lineno = 117; __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[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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;
  __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[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_ranks, (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_bstruct_ranks, (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_bstride_0_ranks = __pyx_bstruct_ranks.strides[0];
    __pyx_bshape_0_ranks = __pyx_bstruct_ranks.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_ranks));
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":120
 * 
 *     # py2.5/win32 hack, can't pass i8
 *     try:             # <<<<<<<<<<<<<<
 *         _as = values.argsort()
 *     except TypeError:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":121
 *     # py2.5/win32 hack, can't pass i8
 *     try:
 *         _as = values.argsort()             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         if not retry:
 */
      __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 = 121; __pyx_clineno = __LINE__; goto __pyx_L7_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[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v__as);
      __pyx_v__as = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L14_try_end;
    __pyx_L7_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":122
 *     try:
 *         _as = values.argsort()
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         if not retry:
 *             raise
 */
    __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("pandas._tseries.rank_1d_generic");
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":123
 *         _as = values.argsort()
 *     except TypeError:
 *         if not retry:             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
      __pyx_t_5 = (!__pyx_v_retry);
      if (__pyx_t_5) {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":124
 *     except TypeError:
 *         if not retry:
 *             raise             # <<<<<<<<<<<<<<
 * 
 *         valid_locs = (-mask).nonzero()[0]
 */
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1);
        __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
        goto __pyx_L17;
      }
      __pyx_L17:;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":126
 *             raise
 * 
 *         valid_locs = (-mask).nonzero()[0]             # <<<<<<<<<<<<<<
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0))
 *         np.putmask(ranks, mask, np.nan)
 */
      __pyx_t_4 = PyNumber_Negative(__pyx_v_mask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_valid_locs);
      __pyx_v_valid_locs = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":127
 * 
 *         valid_locs = (-mask).nonzero()[0]
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0))             # <<<<<<<<<<<<<<
 *         np.putmask(ranks, mask, np.nan)
 *         return ranks
 */
      __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(((PyObject *)__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 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(((PyObject *)__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);
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":128
 *         valid_locs = (-mask).nonzero()[0]
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0))
 *         np.putmask(ranks, mask, np.nan)             # <<<<<<<<<<<<<<
 *         return ranks
 * 
 */
      __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_14 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__putmask); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__nan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_15));
      __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
      PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_ranks));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_ranks));
      __Pyx_INCREF(__pyx_v_mask);
      PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_mask);
      __Pyx_GIVEREF(__pyx_v_mask);
      PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":129
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0))
 *         np.putmask(ranks, mask, np.nan)
 *         return ranks             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
      __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_3); __pyx_t_3 = 0;
      goto __pyx_L10_except_return;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L8_exception_handled;
    }
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L10_except_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L8_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L14_try_end:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":131
 *         return ranks
 * 
 *     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 = 131; __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 = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __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[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_sorted_data));
  __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":132
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__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[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_argsorted, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_bstruct_argsorted, (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_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_bstride_0_argsorted = __pyx_bstruct_argsorted.strides[0];
    __pyx_bshape_0_argsorted = __pyx_bstruct_argsorted.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_argsorted));
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":134
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         sum_ranks += i + 1
 *         dups += 1
 */
  __pyx_t_6 = __pyx_v_n;
  for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_6; __pyx_t_17+=1) {
    __pyx_v_i = __pyx_t_17;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":135
 * 
 *     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));

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":136
 *     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);

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":137
 *         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_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __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_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":138
 *         dups += 1
 *         val = util.get_value_at(sorted_data, i)
 *         if val is nan_value:             # <<<<<<<<<<<<<<
 *             ranks[argsorted[i]] = nan
 *             continue
 */
    __pyx_t_5 = (__pyx_v_val == __pyx_v_nan_value);
    if (__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":139
 *         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_18 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_bshape_0_argsorted;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_argsorted)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_19 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_18, __pyx_bstride_0_argsorted));
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_bshape_0_ranks;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_ranks)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_19, __pyx_bstride_0_ranks) = __pyx_v_6pandas_8_tseries_nan;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":140
 *         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_L18_continue;
      goto __pyx_L20;
    }
    __pyx_L20:;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":141
 *             ranks[argsorted[i]] = nan
 *             continue
 *         if (i == n - 1 or             # <<<<<<<<<<<<<<
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 *             for j in range(i - dups + 1, i + 1):
 */
    __pyx_t_5 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_5) {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":142
 *             continue
 *         if (i == n - 1 or
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):             # <<<<<<<<<<<<<<
 *             for j in range(i - dups + 1, i + 1):
 *                 ranks[argsorted[j]] = sum_ranks / dups
 */
      __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_i + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_f_6pandas_8_tseries_are_diff(__pyx_t_2, __pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __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_20 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_21 = __pyx_t_20;
    } else {
      __pyx_t_21 = __pyx_t_5;
    }
    if (__pyx_t_21) {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":143
 *         if (i == n - 1 or
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 *             for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                 ranks[argsorted[j]] = sum_ranks / dups
 *             sum_ranks = dups = 0
 */
      __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;

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":144
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 *             for j in range(i - dups + 1, i + 1):
 *                 ranks[argsorted[j]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *             sum_ranks = dups = 0
 *     return ranks
 */
        if (unlikely(__pyx_v_dups == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_24 = __pyx_v_j;
        __pyx_t_8 = -1;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_bshape_0_argsorted;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_24 >= __pyx_bshape_0_argsorted)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_24, __pyx_bstride_0_argsorted));
        __pyx_t_8 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_bshape_0_ranks;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_bshape_0_ranks)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_25, __pyx_bstride_0_ranks) = (__pyx_v_sum_ranks / __pyx_v_dups);
      }

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":145
 *             for j in range(i - dups + 1, i + 1):
 *                 ranks[argsorted[j]] = sum_ranks / dups
 *             sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 *     return ranks
 * 
 */
      __pyx_v_sum_ranks = 0;
      __pyx_v_dups = 0;
      goto __pyx_L21;
    }
    __pyx_L21:;
    __pyx_L18_continue:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":146
 *                 ranks[argsorted[j]] = sum_ranks / dups
 *             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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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_bstruct_ranks);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_1d_generic");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_ranks);
  __Pyx_DECREF((PyObject *)__pyx_v_sorted_data);
  __Pyx_DECREF((PyObject *)__pyx_v_values);
  __Pyx_DECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF(__pyx_v_nan_value);
  __Pyx_DECREF(__pyx_v_mask);
  __Pyx_DECREF(__pyx_v__as);
  __Pyx_DECREF(__pyx_v_valid_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":148
 *     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;
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("are_diff");

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":149
 * 
 * cdef inline are_diff(object left, object right):
 *     try:             # <<<<<<<<<<<<<<
 *         return fabs(left - right) > FP_ERR
 *     except TypeError:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":150
 * 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_1 = PyNumber_Subtract(__pyx_v_left, __pyx_v_right); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong((fabs(__pyx_t_2) > __pyx_v_6pandas_8_tseries_FP_ERR)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":151
 *     try:
 *         return fabs(left - right) > FP_ERR
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         return left != right
 * 
 */
    __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_3) {
      __Pyx_AddTraceback("pandas._tseries.are_diff");
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":152
 *         return fabs(left - right) > FP_ERR
 *     except TypeError:
 *         return left != right             # <<<<<<<<<<<<<<
 * 
 * class Infinity(object):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L10_try_end:;
  }

  __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);
  __Pyx_AddTraceback("pandas._tseries.are_diff");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":156
 * class Infinity(object):
 * 
 *     return_false = lambda self, other: False             # <<<<<<<<<<<<<<
 *     return_true = lambda self, other: True
 *     __lt__ = return_false
 */

static PyObject *__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_lambda_methdef6pandas_8_tseries_8Infinity_lambda1 = {__Pyx_NAMESTR("__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda1"), (PyCFunction)__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda1, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__other,0};
  __Pyx_RefNannySetupContext("__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda1");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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("<lambda>", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "<lambda>") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __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 {
    __pyx_v_self = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_other = PyTuple_GET_ITEM(__pyx_args, 1);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("<lambda>", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Infinity.lambda1");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); 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_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.Infinity.lambda1");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":157
 * 
 *     return_false = lambda self, other: False
 *     return_true = lambda self, other: True             # <<<<<<<<<<<<<<
 *     __lt__ = return_false
 *     __le__ = return_false
 */

static PyObject *__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_lambda_methdef6pandas_8_tseries_8Infinity_lambda2 = {__Pyx_NAMESTR("__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda2"), (PyCFunction)__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__other,0};
  __Pyx_RefNannySetupContext("__pyx_lambda_funcdef6pandas_8_tseries_8Infinity_lambda2");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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("<lambda>", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __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, PyTuple_GET_SIZE(__pyx_args), "<lambda>") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __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 {
    __pyx_v_self = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_other = PyTuple_GET_ITEM(__pyx_args, 1);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("<lambda>", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Infinity.lambda2");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __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.Infinity.lambda2");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/stats.pyx":166
 *     __cmp__ = return_false
 * 
 * def rank_2d_generic(object in_arr, axis=0):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */

static PyObject *__pyx_pf_6pandas_8_tseries_144rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_144rank_2d_generic[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_144rank_2d_generic = {__Pyx_NAMESTR("rank_2d_generic"), (PyCFunction)__pyx_pf_6pandas_8_tseries_144rank_2d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_144rank_2d_generic)};
static PyObject *__pyx_pf_6pandas_8_tseries_144rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_axis = 0;
  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;
  PyArrayObject *__pyx_v_values;
  PyArrayObject *__pyx_v_argsorted;
  PyObject *__pyx_v_val;
  PyObject *__pyx_v_nan_value;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  PyObject *__pyx_v_mask;
  Py_buffer __pyx_bstruct_ranks;
  Py_ssize_t __pyx_bstride_0_ranks = 0;
  Py_ssize_t __pyx_bstride_1_ranks = 0;
  Py_ssize_t __pyx_bshape_0_ranks = 0;
  Py_ssize_t __pyx_bshape_1_ranks = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bstride_1_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_ssize_t __pyx_bshape_1_values = 0;
  Py_buffer __pyx_bstruct_argsorted;
  Py_ssize_t __pyx_bstride_0_argsorted = 0;
  Py_ssize_t __pyx_bstride_1_argsorted = 0;
  Py_ssize_t __pyx_bshape_0_argsorted = 0;
  Py_ssize_t __pyx_bshape_1_argsorted = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  PyArrayObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__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;
  int __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;
  __pyx_t_5numpy_int64_t __pyx_t_34;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,0};
  __Pyx_RefNannySetupContext("rank_2d_generic");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "rank_2d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_axis = values[1];
  } else {
    __pyx_v_axis = ((PyObject *)__pyx_int_0);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_axis = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_in_arr = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_2d_generic", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_2d_generic");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_in_arr);
  __pyx_v_ranks = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_argsorted = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_nan_value = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_mask = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_ranks.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  __pyx_bstruct_argsorted.buf = NULL;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":172
 * 
 *     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;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":178
 *         int32_t idx
 *         object val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 * 
 *     in_arr = np.asarray(in_arr)
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":180
 *         float64_t sum_ranks = 0
 * 
 *     in_arr = np.asarray(in_arr)             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__asarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __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[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __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_v_in_arr);
  __pyx_v_in_arr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":182
 *     in_arr = np.asarray(in_arr)
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         values = in_arr.T.copy()
 *     else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":183
 * 
 *     if axis == 0:
 *         values = in_arr.T.copy()             # <<<<<<<<<<<<<<
 *     else:
 *         values = in_arr.copy()
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __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[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__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[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
      __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":185
 *         values = in_arr.T.copy()
 *     else:
 *         values = in_arr.copy()             # <<<<<<<<<<<<<<
 * 
 *     if values.dtype != np.object_:
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
      __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":187
 *         values = in_arr.copy()
 * 
 *     if values.dtype != np.object_:             # <<<<<<<<<<<<<<
 *         values = values.astype('O')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __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[0]; __pyx_lineno = 187; __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_1, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __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_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":188
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     nan_value = Infinity() # always greater than everything
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__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[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
      __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":190
 *         values = values.astype('O')
 * 
 *     nan_value = Infinity() # always greater than everything             # <<<<<<<<<<<<<<
 *     mask = isnullobj2d(values)
 *     np.putmask(values, mask, nan_value)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Infinity); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __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[0]; __pyx_lineno = 190; __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_nan_value);
  __pyx_v_nan_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":191
 * 
 *     nan_value = Infinity() # always greater than everything
 *     mask = isnullobj2d(values)             # <<<<<<<<<<<<<<
 *     np.putmask(values, mask, nan_value)
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj2d); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __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[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __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(__pyx_v_mask);
  __pyx_v_mask = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":192
 *     nan_value = Infinity() # always greater than everything
 *     mask = isnullobj2d(values)
 *     np.putmask(values, mask, nan_value)             # <<<<<<<<<<<<<<
 * 
 *     n, k = (<object> values).shape
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __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 = 192; __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(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_INCREF(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_mask);
  __Pyx_GIVEREF(__pyx_v_mask);
  __Pyx_INCREF(__pyx_v_nan_value);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nan_value);
  __Pyx_GIVEREF(__pyx_v_nan_value);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":194
 *     np.putmask(values, mask, nan_value)
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
    PyObject* tuple = __pyx_t_3;
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    __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[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_n = __pyx_t_10;
    __pyx_v_k = __pyx_t_11;
  } else {
    __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_EndUnpack(__pyx_t_12, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_v_n = __pyx_t_11;
    __pyx_v_k = __pyx_t_10;
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":195
 * 
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_12));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
  __pyx_t_12 = 0;
  __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __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(((PyObject *)__pyx_t_12)); __pyx_t_12 = 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 = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_ranks, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_bstruct_ranks, (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_bstride_0_ranks = __pyx_bstruct_ranks.strides[0]; __pyx_bstride_1_ranks = __pyx_bstruct_ranks.strides[1];
    __pyx_bshape_0_ranks = __pyx_bstruct_ranks.shape[0]; __pyx_bshape_1_ranks = __pyx_bstruct_ranks.shape[1];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_13 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_ranks));
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":197
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         argsorted = values.argsort(1).astype('i8')
 *     except TypeError:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":198
 * 
 *     try:
 *         argsorted = values.argsort(1).astype('i8')             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         values = in_arr
 */
      __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__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[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __pyx_t_14 = ((PyArrayObject *)__pyx_t_12);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_argsorted, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_argsorted, (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_bstride_0_argsorted = __pyx_bstruct_argsorted.strides[0]; __pyx_bstride_1_argsorted = __pyx_bstruct_argsorted.strides[1];
        __pyx_bshape_0_argsorted = __pyx_bstruct_argsorted.shape[0]; __pyx_bshape_1_argsorted = __pyx_bstruct_argsorted.shape[1];
        if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      }
      __pyx_t_14 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_v_argsorted));
      __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_12);
      __pyx_t_12 = 0;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":199
 *     try:
 *         argsorted = values.argsort(1).astype('i8')
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         values = in_arr
 *         for i in range(len(values)):
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pandas._tseries.rank_2d_generic");
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":200
 *         argsorted = values.argsort(1).astype('i8')
 *     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 = 200; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __pyx_t_5 = ((PyArrayObject *)__pyx_v_in_arr);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0]; __pyx_bstride_1_values = __pyx_bstruct_values.strides[1];
        __pyx_bshape_0_values = __pyx_bstruct_values.shape[0]; __pyx_bshape_1_values = __pyx_bstruct_values.shape[1];
        if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      }
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_v_in_arr);
      __Pyx_DECREF(((PyObject *)__pyx_v_values));
      __pyx_v_values = ((PyArrayObject *)__pyx_v_in_arr);

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":201
 *     except TypeError:
 *         values = in_arr
 *         for i in range(len(values)):             # <<<<<<<<<<<<<<
 *             ranks[i] = rank_1d_generic(in_arr[i])
 *         if axis == 0:
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":202
 *         values = in_arr
 *         for i in range(len(values)):
 *             ranks[i] = rank_1d_generic(in_arr[i])             # <<<<<<<<<<<<<<
 *         if axis == 0:
 *             return ranks.T
 */
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__rank_1d_generic); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_in_arr, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_16));
        PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_ranks), __pyx_v_i, __pyx_t_15, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":203
 *         for i in range(len(values)):
 *             ranks[i] = rank_1d_generic(in_arr[i])
 *         if axis == 0:             # <<<<<<<<<<<<<<
 *             return ranks.T
 *         else:
 */
      __pyx_t_15 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (__pyx_t_4) {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":204
 *             ranks[i] = rank_1d_generic(in_arr[i])
 *         if axis == 0:
 *             return ranks.T             # <<<<<<<<<<<<<<
 *         else:
 *             return ranks
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_15 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_r = __pyx_t_15;
        __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L11_except_return;
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":206
 *             return ranks.T
 *         else:
 *             return ranks             # <<<<<<<<<<<<<<
 * 
 *     values.sort(axis=1)
 */
        __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L11_except_return;
      }
      __pyx_L20:;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L9_exception_handled;
    }
    __pyx_L10_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L11_except_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L15_try_end:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":208
 *             return ranks
 * 
 *     values.sort(axis=1)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__sort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__axis), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __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_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":210
 *     values.sort(axis=1)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         dups = sum_ranks = infs = 0
 *         for j in range(k):
 */
  __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;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":211
 * 
 *     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;

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":212
 *     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_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;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":213
 *         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_19 = __pyx_v_i;
      __pyx_t_20 = __pyx_v_j;
      __pyx_t_6 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_bshape_0_values;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_values)) __pyx_t_6 = 0;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_bshape_1_values;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 1;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_1_values)) __pyx_t_6 = 1;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_12 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_19, __pyx_bstride_0_values, __pyx_t_20, __pyx_bstride_1_values);
      __Pyx_INCREF((PyObject*)__pyx_t_12);
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":214
 *         for j in range(k):
 *             val = values[i, j]
 *             if val is nan_value:             # <<<<<<<<<<<<<<
 *                 ranks[i, argsorted[i, j]] = nan
 *                 infs += 1
 */
      __pyx_t_4 = (__pyx_v_val == __pyx_v_nan_value);
      if (__pyx_t_4) {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":215
 *             val = values[i, j]
 *             if val is nan_value:
 *                 ranks[i, argsorted[i, j]] = nan             # <<<<<<<<<<<<<<
 *                 infs += 1
 *                 continue
 */
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_22 = __pyx_v_j;
        __pyx_t_6 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_21 += __pyx_bshape_0_argsorted;
          if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_argsorted)) __pyx_t_6 = 0;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_bshape_1_argsorted;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_22 >= __pyx_bshape_1_argsorted)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_24 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_21, __pyx_bstride_0_argsorted, __pyx_t_22, __pyx_bstride_1_argsorted));
        __pyx_t_6 = -1;
        if (__pyx_t_23 < 0) {
          __pyx_t_23 += __pyx_bshape_0_ranks;
          if (unlikely(__pyx_t_23 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_23 >= __pyx_bshape_0_ranks)) __pyx_t_6 = 0;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_bshape_1_ranks;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_24 >= __pyx_bshape_1_ranks)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_23, __pyx_bstride_0_ranks, __pyx_t_24, __pyx_bstride_1_ranks) = __pyx_v_6pandas_8_tseries_nan;

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":216
 *             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);

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":217
 *                 ranks[i, argsorted[i, j]] = nan
 *                 infs += 1
 *                 continue             # <<<<<<<<<<<<<<
 *             sum_ranks += (j - infs) + 1
 *             dups += 1
 */
        goto __pyx_L23_continue;
        goto __pyx_L25;
      }
      __pyx_L25:;

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":218
 *                 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));

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":219
 *                 continue
 *             sum_ranks += (j - infs) + 1
 *             dups += 1             # <<<<<<<<<<<<<<
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 *                 for z in range(j - dups + 1, j + 1):
 */
      __pyx_v_dups = (__pyx_v_dups + 1);

      /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":220
 *             sum_ranks += (j - infs) + 1
 *             dups += 1
 *             if j == k - 1 or are_diff(values[i, j + 1], val):             # <<<<<<<<<<<<<<
 *                 for z in range(j - dups + 1, j + 1):
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups
 */
      __pyx_t_4 = (__pyx_v_j == (__pyx_v_k - 1));
      if (!__pyx_t_4) {
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_26 = (__pyx_v_j + 1);
        __pyx_t_6 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_bshape_0_values;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_bshape_0_values)) __pyx_t_6 = 0;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_bshape_1_values;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_26 >= __pyx_bshape_1_values)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_12 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_25, __pyx_bstride_0_values, __pyx_t_26, __pyx_bstride_1_values);
        __Pyx_INCREF((PyObject*)__pyx_t_12);
        __pyx_t_3 = __pyx_f_6pandas_8_tseries_are_diff(__pyx_t_12, __pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_28 = __pyx_t_27;
      } else {
        __pyx_t_28 = __pyx_t_4;
      }
      if (__pyx_t_28) {

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":221
 *             dups += 1
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 *                 for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 sum_ranks = dups = 0
 */
        __pyx_t_29 = (__pyx_v_j + 1);
        for (__pyx_t_30 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_30 < __pyx_t_29; __pyx_t_30+=1) {
          __pyx_v_z = __pyx_t_30;

          /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":222
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 *                 for z in range(j - dups + 1, j + 1):
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *                 sum_ranks = dups = 0
 * 
 */
          if (unlikely(__pyx_v_dups == 0)) {
            PyErr_Format(PyExc_ZeroDivisionError, "float division");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_31 = __pyx_v_i;
          __pyx_t_32 = __pyx_v_z;
          __pyx_t_6 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_bshape_0_argsorted;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_6 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_bshape_0_argsorted)) __pyx_t_6 = 0;
          if (__pyx_t_32 < 0) {
            __pyx_t_32 += __pyx_bshape_1_argsorted;
            if (unlikely(__pyx_t_32 < 0)) __pyx_t_6 = 1;
          } else if (unlikely(__pyx_t_32 >= __pyx_bshape_1_argsorted)) __pyx_t_6 = 1;
          if (unlikely(__pyx_t_6 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_6);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_33 = __pyx_v_i;
          __pyx_t_34 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_argsorted.buf, __pyx_t_31, __pyx_bstride_0_argsorted, __pyx_t_32, __pyx_bstride_1_argsorted));
          __pyx_t_6 = -1;
          if (__pyx_t_33 < 0) {
            __pyx_t_33 += __pyx_bshape_0_ranks;
            if (unlikely(__pyx_t_33 < 0)) __pyx_t_6 = 0;
          } else if (unlikely(__pyx_t_33 >= __pyx_bshape_0_ranks)) __pyx_t_6 = 0;
          if (__pyx_t_34 < 0) {
            __pyx_t_34 += __pyx_bshape_1_ranks;
            if (unlikely(__pyx_t_34 < 0)) __pyx_t_6 = 1;
          } else if (unlikely(__pyx_t_34 >= __pyx_bshape_1_ranks)) __pyx_t_6 = 1;
          if (unlikely(__pyx_t_6 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_6);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ranks.buf, __pyx_t_33, __pyx_bstride_0_ranks, __pyx_t_34, __pyx_bstride_1_ranks) = (__pyx_v_sum_ranks / __pyx_v_dups);
        }

        /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":223
 *                 for z in range(j - dups + 1, j + 1):
 *                     ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
        __pyx_v_sum_ranks = 0;
        __pyx_v_dups = 0;
        goto __pyx_L26;
      }
      __pyx_L26:;
      __pyx_L23_continue:;
    }
  }

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":225
 *                 sum_ranks = dups = 0
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         return ranks.T
 *     else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_28) {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":226
 * 
 *     if axis == 0:
 *         return ranks.T             # <<<<<<<<<<<<<<
 *     else:
 *         return ranks
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __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_L29;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":228
 *         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_L29:;

  __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_12);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_2d_generic");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ranks);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_argsorted);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_ranks);
  __Pyx_DECREF((PyObject *)__pyx_v_values);
  __Pyx_DECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF(__pyx_v_nan_value);
  __Pyx_DECREF(__pyx_v_mask);
  __Pyx_DECREF(__pyx_v_in_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14cache_readonly___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget);
  ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget = __pyx_v_func;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->name);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->name);
  ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_v_cache;
  PyObject *__pyx_v_val;
  PyObject *__pyx_r = NULL;
  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_t_6;
  PyObject *__pyx_t_7;
  __Pyx_RefNannySetupContext("__get__");
  __pyx_v_cache = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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) {

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget);
    __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/Users/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 = __pyx_v_obj;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((PyObject *)__pyx_n_s___cache);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = Py_None;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 18; __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_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_v_cache);
  __pyx_v_cache = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Users/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) {

    /* "/Users/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_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_INCREF(((PyObject *)__pyx_t_5));
    __Pyx_DECREF(__pyx_v_cache);
    __pyx_v_cache = ((PyObject *)__pyx_t_5);
    if (PyObject_SetAttr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/Users/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_5 = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->name;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyDict_Contains(__pyx_v_cache, __pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {

    /* "/Users/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_5 = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->name;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = PyDict_GetItem(__pyx_v_cache, __pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_t_7));
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = ((PyObject *)__pyx_t_7);

    /* "/Users/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_L7;
  }
  /*else*/ {

    /* "/Users/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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_INCREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    __pyx_t_4 = PyObject_Call(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget, ((PyObject *)__pyx_t_5), NULL); 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_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/properties.pyx":28
 *         else:
 *             val = self.fget(obj)
 *             PyDict_SetItem(cache, self.name, val)             # <<<<<<<<<<<<<<
 *             return val
 * 
 */
    __pyx_t_4 = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->name;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = PyDict_SetItem(__pyx_v_cache, __pyx_t_4, __pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "/Users/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_L7:;

  __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.cache_readonly.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_cache);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4fget___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->fget);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__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;
}

static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4name___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4name___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self)->name);
  __pyx_r = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__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;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_12AxisProperty___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_axis = 0;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__axis,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_0);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_axis = values[0];
  } else {
    __pyx_v_axis = ((PyObject *)__pyx_int_0);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_axis = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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;}
  ((struct __pyx_obj_6pandas_8_tseries_AxisProperty *)__pyx_v_self)->axis = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.AxisProperty.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_12AxisProperty_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_v_axes = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/Users/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;

  /* "/Users/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), ((struct __pyx_obj_6pandas_8_tseries_AxisProperty *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_axes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_2__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_12AxisProperty_2__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_AxisProperty *)__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(((PyObject *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_11SeriesIndex___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v__ensure_index;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  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_v__ensure_index = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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(((PyObject *)__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_77), ((PyObject *)__pyx_t_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 (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_DECREF(__pyx_v__ensure_index);
  __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;

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__pyx_v_self)->_check_type);
  __Pyx_DECREF(((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__pyx_v_self)->_check_type);
  ((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__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_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v__ensure_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_11SeriesIndex_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_2__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_11SeriesIndex_2__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/Users/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 = __pyx_v_obj;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_2 != __pyx_t_3);
  if (__pyx_t_4) {

    /* "/Users/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_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/Users/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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_5 = PyObject_Call(((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__pyx_v_self)->_check_type, ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 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_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.SeriesIndex.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14ValuesProperty___get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("__get__");
  __pyx_v_base = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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);

  /* "/Users/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_DECREF(__pyx_v_base);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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(((PyObject *)__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_L5;
  }
  /*else*/ {

    /* "/Users/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_L5:;

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_DECREF(__pyx_v_base);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_145infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_145infer_dtype = {__Pyx_NAMESTR("infer_dtype"), (PyCFunction)__pyx_pf_6pandas_8_tseries_145infer_dtype, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_145infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val;
  PyArrayObject *__pyx_v_values;
  PyObject *__pyx_v_val_kind;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_7;
  __Pyx_RefNannySetupContext("infer_dtype");
  __pyx_self = __pyx_self;
  __Pyx_INCREF(__pyx_v__values);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val_kind = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":35
 *         ndarray values
 * 
 *     if isinstance(_values, np.ndarray):             # <<<<<<<<<<<<<<
 *         values = _values
 *     else:
 */
  __pyx_t_1 = __pyx_v__values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_1, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "/Users/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_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_v__values);
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/Users/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_2 = __pyx_v__values;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyList_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_2, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (!__pyx_t_3);
    if (__pyx_t_4) {

      /* "/Users/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(((PyObject *)__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_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v__values);
      __pyx_v__values = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/Users/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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_80); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __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[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_2, ((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_2); __pyx_t_2 = 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_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L5:;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":43
 * 
 *     n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return 'empty'
 * 
 */
  __pyx_t_4 = (__pyx_v_n == 0);
  if (__pyx_t_4) {

    /* "/Users/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_L7;
  }
  __pyx_L7:;

  /* "/Users/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_DECREF(__pyx_v_val_kind);
  __pyx_v_val_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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_4 = ((PySequence_Contains(__pyx_t_1, __pyx_v_val_kind))); if (unlikely(__pyx_t_4 < 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_4) {

    /* "/Users/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_L8;
  }
  __pyx_L8:;

  /* "/Users/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_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, 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_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 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_4) {

    /* "/Users/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_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_81), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__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[1]; __pyx_lineno = 51; __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_L9;
  }
  __pyx_L9:;

  /* "/Users/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_2 = get_value_1d(__pyx_v_values, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_val);
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Users/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_4 = is_integer_object(__pyx_v_val);
  if (__pyx_t_4) {

    /* "/Users/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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_integer_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __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[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_2, ((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_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__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[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_4) {

      /* "/Users/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_L11;
    }
    __pyx_L11:;

    /* "/Users/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_82));
    __pyx_r = ((PyObject *)__pyx_kp_s_82);
    goto __pyx_L0;
    goto __pyx_L10;
  }

  /* "/Users/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_4 = __pyx_f_6pandas_8_tseries_is_datetime(__pyx_v_val);
  if (__pyx_t_4) {

    /* "/Users/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(((PyObject *)__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_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __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_1)); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "/Users/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_L12;
    }
    __pyx_L12:;
    goto __pyx_L10;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":63
 *             return 'datetime'
 * 
 *     elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *         if is_float_array(values):
 * 
 */
  __pyx_t_4 = is_float_object(__pyx_v_val);
  if (__pyx_t_4) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":64
 * 
 *     elif util.is_float_object(val):
 *         if is_float_array(values):             # <<<<<<<<<<<<<<
 * 
 *             return 'floating'
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_float_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __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[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_2, ((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_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__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[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_4) {

      /* "/Users/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_L13;
    }
    __pyx_L13:;
    goto __pyx_L10;
  }

  /* "/Users/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_4 = is_bool_object(__pyx_v_val);
  if (__pyx_t_4) {

    /* "/Users/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(((PyObject *)__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_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __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_1)); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "/Users/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_L14;
    }
    __pyx_L14:;
    goto __pyx_L10;
  }

  /* "/Users/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_4 = is_string_object(__pyx_v_val);
  if (__pyx_t_4) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":73
 * 
 *     elif util.is_string_object(val):
 *         if is_string_array(values):             # <<<<<<<<<<<<<<
 *             return 'string'
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_string_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __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[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_2, ((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_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__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[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_4) {

      /* "/Users/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_L15;
    }
    __pyx_L15:;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "/Users/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;

    /* "/Users/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;

    /* "/Users/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_4 = is_integer_object(__pyx_v_val);
    if (__pyx_t_4) {

      /* "/Users/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_82));
      __pyx_r = ((PyObject *)__pyx_kp_s_82);
      goto __pyx_L0;
      goto __pyx_L18;
    }
    __pyx_L18:;
  }

  /* "/Users/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_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.infer_dtype");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF((PyObject *)__pyx_v_values);
  __Pyx_DECREF(__pyx_v_val_kind);
  __Pyx_DECREF(__pyx_v__values);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_146infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_146infer_dtype_list = {__Pyx_NAMESTR("infer_dtype_list"), (PyCFunction)__pyx_pf_6pandas_8_tseries_146infer_dtype_list, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_146infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  __Pyx_RefNannySetupContext("infer_dtype_list");
  __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;}

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":85
 * def infer_dtype_list(list values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == 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_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.infer_dtype_list");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("is_datetime");

  /* "/Users/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_t_1 = __pyx_v_o;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = PyDateTime_Check(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "/Users/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_147is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_147is_bool_array = {__Pyx_NAMESTR("is_bool_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_147is_bool_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_147is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf;
  Py_buffer __pyx_bstruct_objbuf;
  Py_ssize_t __pyx_bstride_0_objbuf = 0;
  Py_ssize_t __pyx_bshape_0_objbuf = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("is_bool_array");
  __pyx_self = __pyx_self;
  __pyx_v_objbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_objbuf.buf = NULL;
  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;}

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __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__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_1); __pyx_t_1 = 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) {

    /* "/Users/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_L5;
  }

  /* "/Users/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(__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_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __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_RichCompare(__pyx_t_4, __pyx_t_1, 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_1); __pyx_t_1 = 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) {

    /* "/Users/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_bstruct_objbuf);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_objbuf, (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_bstruct_objbuf, (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_bstride_0_objbuf = __pyx_bstruct_objbuf.strides[0];
      __pyx_bshape_0_objbuf = __pyx_bstruct_objbuf.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(__pyx_v_values);
    __Pyx_DECREF(((PyObject *)__pyx_v_objbuf));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/Users/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) {

      /* "/Users/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_L6;
    }
    __pyx_L6:;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_2; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/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_bshape_0_objbuf;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_objbuf)) __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_bstruct_objbuf.buf, __pyx_t_11, __pyx_bstride_0_objbuf);
      __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) {

        /* "/Users/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_L9;
      }
      __pyx_L9:;
    }

    /* "/Users/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_L5;
  }
  /*else*/ {

    /* "/Users/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_L5:;

  __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_bstruct_objbuf);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_bool_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_objbuf);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_148is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_148is_integer = {__Pyx_NAMESTR("is_integer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_148is_integer, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_148is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("is_integer");
  __pyx_self = __pyx_self;

  /* "/Users/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_v_o;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(is_integer_object(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.is_integer");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_149is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_149is_integer_array = {__Pyx_NAMESTR("is_integer_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_149is_integer_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_149is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf;
  Py_buffer __pyx_bstruct_objbuf;
  Py_ssize_t __pyx_bstride_0_objbuf = 0;
  Py_ssize_t __pyx_bshape_0_objbuf = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("is_integer_array");
  __pyx_self = __pyx_self;
  __pyx_v_objbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_objbuf.buf = NULL;
  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;}

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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) {

    /* "/Users/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_L5;
  }

  /* "/Users/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(__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_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __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_RichCompare(__pyx_t_4, __pyx_t_1, 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_1); __pyx_t_1 = 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) {

    /* "/Users/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_bstruct_objbuf);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_objbuf, (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_bstruct_objbuf, (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_bstride_0_objbuf = __pyx_bstruct_objbuf.strides[0];
      __pyx_bshape_0_objbuf = __pyx_bstruct_objbuf.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(__pyx_v_values);
    __Pyx_DECREF(((PyObject *)__pyx_v_objbuf));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/Users/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) {

      /* "/Users/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_L6;
    }
    __pyx_L6:;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_2; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/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_bshape_0_objbuf;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_objbuf)) __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_bstruct_objbuf.buf, __pyx_t_11, __pyx_bstride_0_objbuf);
      __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) {

        /* "/Users/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_L9;
      }
      __pyx_L9:;
    }

    /* "/Users/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_L5;
  }
  /*else*/ {

    /* "/Users/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_L5:;

  __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_bstruct_objbuf);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_integer_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_objbuf);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_150is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_150is_float_array = {__Pyx_NAMESTR("is_float_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_150is_float_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_150is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf;
  Py_buffer __pyx_bstruct_objbuf;
  Py_ssize_t __pyx_bstride_0_objbuf = 0;
  Py_ssize_t __pyx_bshape_0_objbuf = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("is_float_array");
  __pyx_self = __pyx_self;
  __pyx_v_objbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_objbuf.buf = NULL;
  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;}

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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) {

    /* "/Users/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_L5;
  }

  /* "/Users/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(__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_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __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_RichCompare(__pyx_t_4, __pyx_t_1, 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_1); __pyx_t_1 = 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) {

    /* "/Users/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_bstruct_objbuf);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_objbuf, (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_bstruct_objbuf, (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_bstride_0_objbuf = __pyx_bstruct_objbuf.strides[0];
      __pyx_bshape_0_objbuf = __pyx_bstruct_objbuf.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(__pyx_v_values);
    __Pyx_DECREF(((PyObject *)__pyx_v_objbuf));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/Users/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) {

      /* "/Users/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_L6;
    }
    __pyx_L6:;

    /* "/Users/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_2 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_2; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/Users/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_bshape_0_objbuf;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_objbuf)) __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_bstruct_objbuf.buf, __pyx_t_11, __pyx_bstride_0_objbuf);
      __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) {

        /* "/Users/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_L9;
      }
      __pyx_L9:;
    }

    /* "/Users/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_L5;
  }
  /*else*/ {

    /* "/Users/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_L5:;

  __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_bstruct_objbuf);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_float_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_objbuf);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_151is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_151is_string_array = {__Pyx_NAMESTR("is_string_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_151is_string_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_151is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf;
  Py_buffer __pyx_bstruct_objbuf;
  Py_ssize_t __pyx_bstride_0_objbuf = 0;
  Py_ssize_t __pyx_bshape_0_objbuf = 0;
  PyObject *__pyx_r = NULL;
  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;
  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_RefNannySetupContext("is_string_array");
  __pyx_self = __pyx_self;
  __pyx_v_objbuf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_objbuf.buf = NULL;
  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;}

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __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__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_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 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_1)); 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_1)); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "/Users/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_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __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;
  }

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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_1, __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_1); __pyx_t_1 = 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) {

    /* "/Users/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_bstruct_objbuf);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_objbuf, (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_bstruct_objbuf, (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_bstride_0_objbuf = __pyx_bstruct_objbuf.strides[0];
      __pyx_bshape_0_objbuf = __pyx_bstruct_objbuf.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(__pyx_v_values);
    __Pyx_DECREF(((PyObject *)__pyx_v_objbuf));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/Users/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) {

      /* "/Users/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_L6;
    }
    __pyx_L6:;

    /* "/Users/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_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;

      /* "/Users/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_bshape_0_objbuf;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_objbuf)) __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_bstruct_objbuf.buf, __pyx_t_12, __pyx_bstride_0_objbuf);
      __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) {

        /* "/Users/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_L9;
      }
      __pyx_L9:;
    }

    /* "/Users/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_L5;
  }
  /*else*/ {

    /* "/Users/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_L5:;

  __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_bstruct_objbuf);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_string_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_objbuf);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_152is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_152is_datetime_array = {__Pyx_NAMESTR("is_datetime_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_152is_datetime_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_152is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("is_datetime_array");
  __pyx_self = __pyx_self;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_3 = (__pyx_v_n == 0);
  if (__pyx_t_3) {

    /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __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;
  }
  __pyx_L5:;

  /* "/Users/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;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_values)) __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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_6, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __pyx_t_3 = (!__pyx_f_6pandas_8_tseries_is_datetime(__pyx_t_1));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "/Users/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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __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_L8;
    }
    __pyx_L8:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":185
 *         if not is_datetime(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_datetime_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_153maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_153maybe_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_153maybe_convert_numeric = {__Pyx_NAMESTR("maybe_convert_numeric"), (PyCFunction)__pyx_pf_6pandas_8_tseries_153maybe_convert_numeric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_153maybe_convert_numeric)};
static PyObject *__pyx_pf_6pandas_8_tseries_153maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_na_values = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_floats;
  PyArrayObject *__pyx_v_ints;
  int __pyx_v_seen_float;
  PyObject *__pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_fval;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_ints;
  Py_ssize_t __pyx_bstride_0_ints = 0;
  Py_ssize_t __pyx_bshape_0_ints = 0;
  Py_buffer __pyx_bstruct_floats;
  Py_ssize_t __pyx_bstride_0_floats = 0;
  Py_ssize_t __pyx_bshape_0_floats = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,0};
  __Pyx_RefNannySetupContext("maybe_convert_numeric");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_na_values = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_floats = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_ints = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_floats.buf = NULL;
  __pyx_bstruct_ints.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":201
 *         float64_t fval
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 * 
 *     floats = np.empty(n, dtype='f8')
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __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 = 203; __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 = 203; __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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 203; __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[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_floats);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_floats, (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_bstruct_floats, (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_bstride_0_floats = __pyx_bstruct_floats.strides[0];
    __pyx_bshape_0_floats = __pyx_bstruct_floats.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_DECREF(((PyObject *)__pyx_v_floats));
  __pyx_v_floats = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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_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_bstruct_ints);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_ints, (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_bstruct_ints, (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_bstride_0_ints = __pyx_bstruct_ints.strides[0];
    __pyx_bshape_0_ints = __pyx_bstruct_ints.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_DECREF(((PyObject *)__pyx_v_ints));
  __pyx_v_ints = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_12, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/Users/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) {

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_15, __pyx_bstride_0_floats) = __pyx_t_14;

      /* "/Users/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_L8;
    }

    /* "/Users/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) {

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_16, __pyx_bstride_0_floats) = __pyx_v_6pandas_8_tseries_nan;

      /* "/Users/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_L8;
    }

    /* "/Users/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) {

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_17, __pyx_bstride_0_floats) = __pyx_v_6pandas_8_tseries_nan;

      /* "/Users/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_L8;
    }

    /* "/Users/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) {

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_18, __pyx_bstride_0_floats) = __pyx_v_6pandas_8_tseries_nan;

      /* "/Users/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_L8;
    }
    /*else*/ {

      /* "/Users/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;

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_19, __pyx_bstride_0_floats) = __pyx_v_fval;

      /* "/Users/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) {

        /* "/Users/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_83)))); 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) {

          /* "/Users/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_L10;
        }
        /*else*/ {

          /* "/Users/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_bshape_0_ints;
            if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_ints)) __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_bstruct_ints.buf, __pyx_t_20, __pyx_bstride_0_ints) = ((__pyx_t_5numpy_int64_t)__pyx_v_fval);
        }
        __pyx_L10:;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":230
 *                     ints[i] = <int64_t> fval
 * 
 *     if seen_float:             # <<<<<<<<<<<<<<
 *         return floats
 *     else:
 */
  if (__pyx_v_seen_float) {

    /* "/Users/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_L11;
  }
  /*else*/ {

    /* "/Users/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_L11:;

  __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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ints);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_floats);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_numeric");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ints);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_floats);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_floats);
  __Pyx_DECREF((PyObject *)__pyx_v_ints);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_154maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_154maybe_convert_objects[] = "\n    Type inference function-- convert object array to proper dtype\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_154maybe_convert_objects = {__Pyx_NAMESTR("maybe_convert_objects"), (PyCFunction)__pyx_pf_6pandas_8_tseries_154maybe_convert_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_154maybe_convert_objects)};
static PyObject *__pyx_pf_6pandas_8_tseries_154maybe_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_floats;
  PyArrayObject *__pyx_v_ints;
  PyArrayObject *__pyx_v_bools;
  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;
  PyObject *__pyx_v_onan;
  __pyx_t_5numpy_float64_t __pyx_v_fnan;
  Py_buffer __pyx_bstruct_bools;
  Py_ssize_t __pyx_bstride_0_bools = 0;
  Py_ssize_t __pyx_bshape_0_bools = 0;
  Py_buffer __pyx_bstruct_objects;
  Py_ssize_t __pyx_bstride_0_objects = 0;
  Py_ssize_t __pyx_bshape_0_objects = 0;
  Py_buffer __pyx_bstruct_ints;
  Py_ssize_t __pyx_bstride_0_ints = 0;
  Py_ssize_t __pyx_bshape_0_ints = 0;
  Py_buffer __pyx_bstruct_floats;
  Py_ssize_t __pyx_bstride_0_floats = 0;
  Py_ssize_t __pyx_bshape_0_floats = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__objects,&__pyx_n_s__try_float,&__pyx_n_s__safe,0};
  __Pyx_RefNannySetupContext("maybe_convert_objects");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_try_float = ((int)0);
    __pyx_v_safe = ((int)0);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: __pyx_v_safe = __Pyx_PyObject_IsTrue(PyTuple_GET_ITEM(__pyx_args, 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;}
      case  2: __pyx_v_try_float = __Pyx_PyObject_IsTrue(PyTuple_GET_ITEM(__pyx_args, 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;}
      case  1: __pyx_v_objects = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_floats = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_ints = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_bools = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_onan = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_floats.buf = NULL;
  __pyx_bstruct_ints.buf = NULL;
  __pyx_bstruct_bools.buf = NULL;
  __pyx_bstruct_objects.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_objects, (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_bstride_0_objects = __pyx_bstruct_objects.strides[0];
  __pyx_bshape_0_objects = __pyx_bstruct_objects.shape[0];

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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 *)__pyx_v_objects);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __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 = 255; __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 = 255; __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 = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 255; __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[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_floats);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_floats, (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_bstruct_floats, (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_bstride_0_floats = __pyx_bstruct_floats.strides[0];
    __pyx_bshape_0_floats = __pyx_bstruct_floats.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_DECREF(((PyObject *)__pyx_v_floats));
  __pyx_v_floats = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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_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_bstruct_ints);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_ints, (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_bstruct_ints, (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_bstride_0_ints = __pyx_bstruct_ints.strides[0];
    __pyx_bshape_0_ints = __pyx_bstruct_ints.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_DECREF(((PyObject *)__pyx_v_ints));
  __pyx_v_ints = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 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 = PyEval_CallObjectWithKeywords(__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_bstruct_bools);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_bools, (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_bstruct_bools, (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_bstride_0_bools = __pyx_bstruct_bools.strides[0];
    __pyx_bshape_0_bools = __pyx_bstruct_bools.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_DECREF(((PyObject *)__pyx_v_bools));
  __pyx_v_bools = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "/Users/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_DECREF(__pyx_v_onan);
  __pyx_v_onan = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":262
 *     fnan = np.nan
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = objects[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/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_bshape_0_objects;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_objects)) __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_bstruct_objects.buf, __pyx_t_15, __pyx_bstride_0_objects);
    __Pyx_INCREF((PyObject*)__pyx_t_12);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "/Users/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) {

      /* "/Users/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;

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_17, __pyx_bstride_0_floats) = __pyx_v_fnan;
      goto __pyx_L8;
    }

    /* "/Users/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) {

      /* "/Users/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;

      /* "/Users/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_bshape_0_bools;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_bools)) __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_bstruct_bools.buf, __pyx_t_19, __pyx_bstride_0_bools) = __pyx_t_18;
      goto __pyx_L8;
    }

    /* "/Users/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) {

      /* "/Users/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;

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_20, __pyx_bstride_0_floats) = __pyx_t_14;

      /* "/Users/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) {

        /* "/Users/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_bshape_0_ints;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_22 >= __pyx_bshape_0_ints)) __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_bstruct_ints.buf, __pyx_t_22, __pyx_bstride_0_ints) = __pyx_t_21;
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }

    /* "/Users/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) {

      /* "/Users/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_bshape_0_floats;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_bshape_0_floats)) __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_bstruct_floats.buf, __pyx_t_23, __pyx_bstride_0_floats) = __pyx_t_14;

      /* "/Users/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_L8;
    }

    /* "/Users/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) {

      /* "/Users/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
 */
      {
        PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
        __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
        __Pyx_XGOTREF(__pyx_save_exc_type);
        __Pyx_XGOTREF(__pyx_save_exc_value);
        __Pyx_XGOTREF(__pyx_save_exc_tb);
        /*try:*/ {

          /* "/Users/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_L10_error;}
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_bshape_0_floats;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_bshape_0_floats)) __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_L10_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_floats.buf, __pyx_t_26, __pyx_bstride_0_floats) = __pyx_t_25;

          /* "/Users/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_save_exc_type); __pyx_save_exc_type = 0;
        __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
        __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
        goto __pyx_L17_try_end;
        __pyx_L10_error:;
        __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;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "/Users/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");
          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_L12_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);

          /* "/Users/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_L11_exception_handled;
        }
        __pyx_L12_except_error:;
        __Pyx_XGIVEREF(__pyx_save_exc_type);
        __Pyx_XGIVEREF(__pyx_save_exc_value);
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
        goto __pyx_L1_error;
        __pyx_L11_exception_handled:;
        __Pyx_XGIVEREF(__pyx_save_exc_type);
        __Pyx_XGIVEREF(__pyx_save_exc_value);
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
        __pyx_L17_try_end:;
      }
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":287
 *                 seen_object = 1
 *         else:
 *             seen_object = 1             # <<<<<<<<<<<<<<
 * 
 *     if not safe:
 */
      __pyx_v_seen_object = 1;
    }
    __pyx_L8:;
  }

  /* "/Users/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) {

    /* "/Users/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) {

      /* "/Users/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) {

        /* "/Users/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_L22;
      }
      /*else*/ {

        /* "/Users/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_L22:;
      goto __pyx_L21;
    }
    /*else*/ {

      /* "/Users/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) {

        /* "/Users/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_L23;
      }

      /* "/Users/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) {

        /* "/Users/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) {

          /* "/Users/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_L24;
        }

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":301
 *                 if seen_float:
 *                     return floats
 *                 elif seen_int:             # <<<<<<<<<<<<<<
 *                     return ints
 *             else:
 */
        if (__pyx_v_seen_int) {

          /* "/Users/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_L24;
        }
        __pyx_L24:;
        goto __pyx_L23;
      }
      /*else*/ {

        /* "/Users/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) {

          /* "/Users/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(((PyObject *)__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_L25;
        }
        __pyx_L25:;
      }
      __pyx_L23:;

      /* "/Users/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_L21:;
    goto __pyx_L20;
  }
  /*else*/ {

    /* "/Users/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) {

      /* "/Users/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) {

        /* "/Users/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_L27;
      }
      /*else*/ {

        /* "/Users/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_L27:;
      goto __pyx_L26;
    }
    /*else*/ {

      /* "/Users/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) {

        /* "/Users/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_L28;
      }

      /* "/Users/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) {

        /* "/Users/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) {

          /* "/Users/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_L29;
        }

        /* "/Users/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) {

          /* "/Users/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_L29;
        }

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":323
 *                 elif seen_float:
 *                     return floats
 *                 elif seen_int:             # <<<<<<<<<<<<<<
 *                     return ints
 *             else:
 */
        if (__pyx_v_seen_int) {

          /* "/Users/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_L29;
        }
        __pyx_L29:;
        goto __pyx_L28;
      }
      /*else*/ {

        /* "/Users/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) {

          /* "/Users/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(((PyObject *)__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_L30;
        }
        __pyx_L30:;
      }
      __pyx_L28:;

      /* "/Users/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_L26:;
  }
  __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_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_bstruct_bools);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_objects);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ints);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_floats);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_objects");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_bools);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_objects);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ints);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_floats);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_floats);
  __Pyx_DECREF((PyObject *)__pyx_v_ints);
  __Pyx_DECREF((PyObject *)__pyx_v_bools);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF(__pyx_v_onan);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_155convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_155convert_sql_column = {__Pyx_NAMESTR("convert_sql_column"), (PyCFunction)__pyx_pf_6pandas_8_tseries_155convert_sql_column, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_155convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("convert_sql_column");
  __pyx_self = __pyx_self;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_15try_parse_dates_parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15try_parse_dates_parse_date, METH_O, __Pyx_DOCSTR(0)};
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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("parse_date");
  __pyx_outer_scope = (struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *)__pyx_self;
  __pyx_cur_scope = __pyx_outer_scope;
  __pyx_self = __pyx_self;

  /* "/Users/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:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/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);
      __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_datetime, __pyx_n_s__strptime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_84));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_84));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_84));
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L5_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_L9_try_return;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L12_try_end;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L5_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;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":353
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     return s
 *     else:
 */
    __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_4) {
      __Pyx_AddTraceback("pandas._tseries.try_parse_dates.parse_date");
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":354
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 *                     return s             # <<<<<<<<<<<<<<
 *     else:
 *         parse_date = parser
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_s);
      __pyx_r = __pyx_v_s;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L8_except_return;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L12_try_end:;
  }

  __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.try_parse_dates.parse_date");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_156try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_156try_parse_dates = {__Pyx_NAMESTR("try_parse_dates"), (PyCFunction)__pyx_pf_6pandas_8_tseries_156try_parse_dates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_156try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *__pyx_cur_scope;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_parser = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result;
  PyObject *__pyx_v_parse_date;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__parser,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_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_parser = ((PyObject *)Py_None);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_parser);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_cur_scope->__pyx_v_datetime = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_parse_date = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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(((PyObject *)__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)); 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 (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_DECREF(__pyx_cur_scope->__pyx_v_datetime);
  __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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":342
 *     from datetime import datetime
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_3;

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":346
 * 
 *     if parser is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from dateutil import parser
 *             parse_date = parser.parse
 */
    {
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
      __Pyx_XGOTREF(__pyx_save_exc_type);
      __Pyx_XGOTREF(__pyx_save_exc_value);
      __Pyx_XGOTREF(__pyx_save_exc_tb);
      /*try:*/ {

        /* "/Users/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_L7_error;}
        __Pyx_GOTREF(((PyObject *)__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)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L7_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 (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L7_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;

        /* "/Users/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_L7_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_v_parse_date);
        __pyx_v_parse_date = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L14_try_end;
      __pyx_L7_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;

      /* "/Users/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");
        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_L9_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);

        /* "/Users/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_binding_PyCFunctionType_NewEx(&__pyx_mdef_6pandas_8_tseries_15try_parse_dates_parse_date, ((PyObject*)__pyx_cur_scope), __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__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_L8_exception_handled;
      }
      __pyx_L9_except_error:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      goto __pyx_L1_error;
      __pyx_L8_exception_handled:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      __pyx_L14_try_end:;
    }
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":356
 *                     return s
 *     else:
 *         parse_date = parser             # <<<<<<<<<<<<<<
 * 
 *     # EAFP
 */
    __Pyx_INCREF(__pyx_v_parser);
    __Pyx_DECREF(__pyx_v_parse_date);
    __pyx_v_parse_date = __pyx_v_parser;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":359
 * 
 *     # EAFP
 *     try:             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < n:
 *             result[i] = parse_date(values[i])
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":360
 *     # EAFP
 *     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++) {

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":361
 *     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_bshape_0_values;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_values)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        }
        __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_12, __pyx_bstride_0_values);
        __Pyx_INCREF((PyObject*)__pyx_t_4);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        __Pyx_GOTREF(((PyObject *)__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 = 361; __pyx_clineno = __LINE__; goto __pyx_L17_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_bshape_0_result;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_result)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        }
        __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_13, __pyx_bstride_0_result);
        __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_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L24_try_end;
    __pyx_L17_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;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":362
 *         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");
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_2);

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":364
 *     except Exception:
 *         # failed
 *         return values             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __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_L20_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_L18_exception_handled;
    }
    __pyx_L19_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L20_except_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L18_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L24_try_end:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":366
 *         return values
 * 
 *     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_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.try_parse_dates");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_datetime);
  __Pyx_DECREF(__pyx_v_parse_date);
  __Pyx_DECREF(__pyx_v_parser);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":368
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_157sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_157sanitize_objects = {__Pyx_NAMESTR("sanitize_objects"), (PyCFunction)__pyx_pf_6pandas_8_tseries_157sanitize_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_157sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_na_values = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val;
  PyObject *__pyx_v_onan;
  Py_ssize_t __pyx_v_na_count;
  PyObject *__pyx_v_memo = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,0};
  __Pyx_RefNannySetupContext("sanitize_objects");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 368; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "sanitize_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 368; __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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_na_values = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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 = 368; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.sanitize_objects");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_onan = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 368; __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 = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":372
 *         Py_ssize_t i, n
 *         object val, onan
 *         Py_ssize_t na_count = 0             # <<<<<<<<<<<<<<
 *         dict memo = {}
 * 
 */
  __pyx_v_na_count = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":373
 *         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 = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_memo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":375
 *         dict memo = {}
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     onan = np.nan
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":376
 * 
 *     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 = 376; __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 = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_onan);
  __pyx_v_onan = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":378
 *     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++) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":379
 * 
 *     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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":380
 *     for i from 0 <= i < n:
 *         val = values[i]
 *         if val == '' or val in na_values:             # <<<<<<<<<<<<<<
 *             values[i] = onan
 *             na_count += 1
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, ((PyObject *)__pyx_kp_s_86), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    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 = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_6;
    }
    if (__pyx_t_8) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":381
 *         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_bshape_0_values;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_9, __pyx_bstride_0_values);
      __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);

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":382
 *         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_L8;
    }

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":383
 *             values[i] = onan
 *             na_count += 1
 *         elif val in memo:             # <<<<<<<<<<<<<<
 *             values[i] = memo[val]
 *         else:
 */
    if (unlikely(__pyx_v_memo == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __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 = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_8) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":384
 *             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 = 384; __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_bshape_0_values;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_11, __pyx_bstride_0_values);
      __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_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":386
 *             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 = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L8:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":388
 *             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 = 388; __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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.sanitize_objects");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_DECREF(__pyx_v_onan);
  __Pyx_XDECREF(__pyx_v_memo);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":390
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_158maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_158maybe_convert_bool = {__Pyx_NAMESTR("maybe_convert_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_158maybe_convert_bool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_158maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result;
  PyObject *__pyx_v_val;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("maybe_convert_bool");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":396
 *         object val
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=np.uint8)
 * 
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":397
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     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 = 397; __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 = 397; __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 = 397; __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 = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 397; __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[1]; __pyx_lineno = 397; __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 = 397; __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[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __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[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":399
 *     result = np.empty(n, dtype=np.uint8)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = arr[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":400
 * 
 *     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_bshape_0_arr;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_arr)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_arr.buf, __pyx_t_12, __pyx_bstride_0_arr);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":402
 *         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_6 = PyObject_RichCompare(__pyx_v_val, ((PyObject *)__pyx_n_s__True), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __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 = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    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 = 402; __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 = 402; __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 = 402; __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) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":403
 * 
 *         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_bshape_0_result;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_result)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_result.buf, __pyx_t_17, __pyx_bstride_0_result) = 1;
      goto __pyx_L7;
    }

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":404
 *         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_6 = PyObject_RichCompare(__pyx_v_val, ((PyObject *)__pyx_n_s__False), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    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 = 404; __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 = 404; __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 = 404; __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) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":405
 *             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_bshape_0_result;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_result)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_result.buf, __pyx_t_18, __pyx_bstride_0_result) = 0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":407
 *             result[i] = 0
 *         else:
 *             return arr             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_arr);
      __pyx_r = __pyx_v_arr;
      goto __pyx_L0;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":409
 *             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 = 409; __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[1]; __pyx_lineno = 409; __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[1]; __pyx_lineno = 409; __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[1]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[1]; __pyx_lineno = 409; __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_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_bool");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":412
 * 
 * 
 * def map_infer(ndarray arr, object f):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */

static PyObject *__pyx_pf_6pandas_8_tseries_159map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_159map_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_159map_infer = {__Pyx_NAMESTR("map_infer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_159map_infer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_159map_infer)};
static PyObject *__pyx_pf_6pandas_8_tseries_159map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayIterObject *__pyx_v_it;
  PyArrayObject *__pyx_v_result;
  PyObject *__pyx_v_val;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject **__pyx_t_16;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,0};
  __Pyx_RefNannySetupContext("map_infer");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 412; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "map_infer") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 412; __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 {
    __pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 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 = 412; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.map_infer");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_it = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":431
 *         object val
 * 
 *     it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyArray_IterNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":432
 * 
 *     it = <flatiter> PyArray_IterNew(arr)
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_3;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":433
 *     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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 433; __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 = 433; __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 = 433; __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 = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 433; __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[1]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 433; __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 = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":434
 *     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_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;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":435
 *     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 = ((PyObject *)__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[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":438
 * 
 *         # 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_2 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_13 = (PyArray_NDIM(((PyArrayObject *)__pyx_t_2)) == 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_14 = __pyx_t_13;
    } else {
      __pyx_t_14 = __pyx_t_12;
    }
    if (__pyx_t_14) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":440
 *         if is_array(val) and PyArray_NDIM(val) == 0:
 *             # is there a faster way to unbox?
 *             val = val.item()             # <<<<<<<<<<<<<<
 * 
 *         result[i] = val
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __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_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":442
 *             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_bshape_0_result;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_result)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_15, __pyx_bstride_0_result);
    __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);

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":445
 * 
 * 
 *         PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result, try_float=0)
 */
    PyArray_ITER_NEXT(__pyx_v_it);
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":447
 *         PyArray_ITER_NEXT(it)
 * 
 *     return maybe_convert_objects(result, try_float=0)             # <<<<<<<<<<<<<<
 * 
 * def to_object_array(list rows):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __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[1]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_2, 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 = 447; __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 = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_5, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __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_4)); __pyx_t_4 = 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_infer");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_it);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":449
 *     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_160to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_160to_object_array = {__Pyx_NAMESTR("to_object_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_160to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_160to_object_array(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;
  PyObject *__pyx_v_row;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bstride_1_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_ssize_t __pyx_bshape_1_result = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("to_object_array");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_row = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":455
 *         list row
 * 
 *     n = len(rows)             # <<<<<<<<<<<<<<
 * 
 *     k = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_rows);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":457
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":458
 * 
 *     k = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         tmp = len(rows[i])
 *         if tmp > k:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":459
 *     k = 0
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])             # <<<<<<<<<<<<<<
 *         if tmp > k:
 *             k = tmp
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_tmp = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":460
 *     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) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":461
 *         tmp = len(rows[i])
 *         if tmp > k:
 *             k = tmp             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype=object)
 */
      __pyx_v_k = __pyx_v_tmp;
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":463
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     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 = 463; __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[1]; __pyx_lineno = 463; __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[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __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 = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 463; __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 = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __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_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0]; __pyx_bstride_1_result = __pyx_bstruct_result.strides[1];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0]; __pyx_bshape_1_result = __pyx_bstruct_result.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":465
 *     result = np.empty((n, k), dtype=object)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         row = rows[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":466
 * 
 *     for i from 0 <= i < n:
 *         row = rows[i]             # <<<<<<<<<<<<<<
 * 
 *         for j from 0 <= j < len(row):
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __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[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_row));
    __pyx_v_row = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":468
 *         row = rows[i]
 * 
 *         for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *             result[i, j] = row[j]
 * 
 */
    if (unlikely(__pyx_v_row == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 468; __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++) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":469
 * 
 *         for j from 0 <= j < len(row):
 *             result[i, j] = row[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_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_bshape_0_result;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_result)) __pyx_t_9 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_bshape_1_result;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_1_result)) __pyx_t_9 = 1;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_13, __pyx_bstride_0_result, __pyx_t_14, __pyx_bstride_1_result);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_DECREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_1);
      *__pyx_t_15 = __pyx_t_1;
      __Pyx_GIVEREF(*__pyx_t_15);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":471
 *             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_1);
  __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_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.to_object_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":473
 *     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_161tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_161tuples_to_object_array = {__Pyx_NAMESTR("tuples_to_object_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_161tuples_to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_161tuples_to_object_array(PyObject *__pyx_self, PyObject *__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;
  PyObject *__pyx_v_tup;
  Py_buffer __pyx_bstruct_tuples;
  Py_ssize_t __pyx_bstride_0_tuples = 0;
  Py_ssize_t __pyx_bshape_0_tuples = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bstride_1_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_ssize_t __pyx_bshape_1_result = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("tuples_to_object_array");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_tup = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_tuples.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tuples), __pyx_ptype_5numpy_ndarray, 1, "tuples", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_tuples, (PyObject*)__pyx_v_tuples, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_tuples = __pyx_bstruct_tuples.strides[0];
  __pyx_bshape_0_tuples = __pyx_bstruct_tuples.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":479
 *         tuple tup
 * 
 *     n = len(tuples)             # <<<<<<<<<<<<<<
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)
 */
  __pyx_t_1 = __pyx_v_tuples;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":480
 * 
 *     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_bshape_0_tuples;
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_tuples)) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_tuples.buf, __pyx_t_3, __pyx_bstride_0_tuples);
  __Pyx_INCREF((PyObject*)__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_k = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":481
 *     n = len(tuples)
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         tup = tuples[i]
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __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[1]; __pyx_lineno = 481; __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[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __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 = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 481; __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 = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __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_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0]; __pyx_bstride_1_result = __pyx_bstruct_result.strides[1];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0]; __pyx_bshape_1_result = __pyx_bstruct_result.shape[1];
    if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":482
 *     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_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;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":483
 *     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_bshape_0_tuples;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_tuples)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_tuples.buf, __pyx_t_13, __pyx_bstride_0_tuples);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_tup));
    __pyx_v_tup = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":484
 *     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;

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":485
 *         tup = tuples[i]
 *         for j in range(k):
 *             result[i, j] = tup[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_tup), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __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_bshape_0_result;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_result)) __pyx_t_4 = 0;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_bshape_1_result;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 1;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_1_result)) __pyx_t_4 = 1;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_16, __pyx_bstride_0_result, __pyx_t_17, __pyx_bstride_1_result);
      __Pyx_GOTREF(*__pyx_t_18);
      __Pyx_DECREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_1);
      *__pyx_t_18 = __pyx_t_1;
      __Pyx_GIVEREF(*__pyx_t_18);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":487
 *             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_1);
  __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_bstruct_tuples);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.tuples_to_object_array");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_tuples);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__pyx_v_tup);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":489
 *     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_162to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_162to_object_array_tuples = {__Pyx_NAMESTR("to_object_array_tuples"), (PyCFunction)__pyx_pf_6pandas_8_tseries_162to_object_array_tuples, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_162to_object_array_tuples(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;
  PyObject *__pyx_v_row;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bstride_1_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_ssize_t __pyx_bshape_1_result = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("to_object_array_tuples");
  __pyx_self = __pyx_self;
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_row = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_result.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":495
 *         tuple row
 * 
 *     n = len(rows)             # <<<<<<<<<<<<<<
 * 
 *     k = 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_rows);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":497
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":498
 * 
 *     k = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         tmp = len(rows[i])
 *         if tmp > k:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":499
 *     k = 0
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])             # <<<<<<<<<<<<<<
 *         if tmp > k:
 *             k = tmp
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_tmp = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":500
 *     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) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":501
 *         tmp = len(rows[i])
 *         if tmp > k:
 *             k = tmp             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype=object)
 */
      __pyx_v_k = __pyx_v_tmp;
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":503
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __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[1]; __pyx_lineno = 503; __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[1]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __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 = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 503; __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 = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __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_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0]; __pyx_bstride_1_result = __pyx_bstruct_result.strides[1];
    __pyx_bshape_0_result = __pyx_bstruct_result.shape[0]; __pyx_bshape_1_result = __pyx_bstruct_result.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":505
 *     result = np.empty((n, k), dtype=object)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             row = rows[i]
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":506
 * 
 *     try:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             row = rows[i]
 *             for j from 0 <= j < len(row):
 */
      __pyx_t_2 = __pyx_v_n;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
        __pyx_v_i = __pyx_t_3;

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":507
 *     try:
 *         for i in range(n):
 *             row = rows[i]             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]
 */
        __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_DECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":508
 *         for i in range(n):
 *             row = rows[i]
 *             for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[j]
 *     except Exception:
 */
        if (unlikely(__pyx_v_row == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_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++) {

          /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":509
 *             row = rows[i]
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]             # <<<<<<<<<<<<<<
 *     except Exception:
 *         # upcast any subclasses to tuple
 */
          __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __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_bshape_0_result;
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_result)) __pyx_t_9 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_bshape_1_result;
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_bshape_1_result)) __pyx_t_9 = 1;
          if (unlikely(__pyx_t_9 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_9);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
          }
          __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_14, __pyx_bstride_0_result, __pyx_t_15, __pyx_bstride_1_result);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_DECREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_1);
          *__pyx_t_16 = __pyx_t_1;
          __Pyx_GIVEREF(*__pyx_t_16);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_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_1); __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":510
 *             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");
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":512
 *     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_2 = __pyx_v_n;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
        __pyx_v_i = __pyx_t_3;

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":513
 *         # 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 = 513; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 513; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(((PyObject *)__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 = 513; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":514
 *         for i in range(n):
 *             row = tuple(rows[i])
 *             for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[j]
 * 
 */
        if (unlikely(__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_L10_except_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++) {

          /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":515
 *             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 = 515; __pyx_clineno = __LINE__; goto __pyx_L10_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_bshape_0_result;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_result)) __pyx_t_9 = 0;
          if (__pyx_t_19 < 0) {
            __pyx_t_19 += __pyx_bshape_1_result;
            if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1;
          } else if (unlikely(__pyx_t_19 >= __pyx_bshape_1_result)) __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_L10_except_error;}
          }
          __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_18, __pyx_bstride_0_result, __pyx_t_19, __pyx_bstride_1_result);
          __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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L9_exception_handled;
    }
    __pyx_L10_except_error:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L15_try_end:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":517
 *                 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_1);
  __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_bstruct_result);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.to_object_array_tuples");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_DECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/inference.pyx":520
 * 
 * 
 * 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_163fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_163fast_multiget = {__Pyx_NAMESTR("fast_multiget"), (PyCFunction)__pyx_pf_6pandas_8_tseries_163fast_multiget, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_163fast_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;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val;
  PyArrayObject *__pyx_v_output = 0;
  Py_buffer __pyx_bstruct_output;
  Py_ssize_t __pyx_bstride_0_output = 0;
  Py_ssize_t __pyx_bshape_0_output = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mapping,&__pyx_n_s__keys,&__pyx_n_s__default,0};
  __Pyx_RefNannySetupContext("fast_multiget");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_87;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 520; __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, PyTuple_GET_SIZE(__pyx_args), "fast_multiget") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __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 {
    __pyx_v_default = __pyx_k_87;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3:
      __pyx_v_default = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2:
      __pyx_v_keys = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_mapping = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.fast_multiget");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_output.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __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 = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":522
 * 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 *)__pyx_v_keys);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":524
 *         Py_ssize_t i, n = len(keys)
 *         object val
 *         ndarray[object] output = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __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 = 524; __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 = 524; __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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 524; __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__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __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 = 524; __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_bstruct_output, (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_bstruct_output.buf = NULL;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
      __pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":526
 *         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) {

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":528
 *     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 = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 528; __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 = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_k_tuple_88), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 528; __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_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":530
 *         return np.empty(0, dtype='f8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_2; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":531
 * 
 *     for i in range(n):
 *         val = util.get_value_1d(keys, i)             # <<<<<<<<<<<<<<
 *         if val in mapping:
 *             output[i] = mapping[val]
 */
    __pyx_t_4 = ((PyObject *)__pyx_v_keys);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = get_value_1d(((PyArrayObject *)__pyx_t_4), __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":532
 *     for i in range(n):
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:             # <<<<<<<<<<<<<<
 *             output[i] = mapping[val]
 *         else:
 */
    if (unlikely(__pyx_v_mapping == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __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 = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_7) {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":533
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:
 *             output[i] = mapping[val]             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = default
 */
      __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_bshape_0_output;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_output)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_output.buf, __pyx_t_9, __pyx_bstride_0_output);
      __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;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":535
 *             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_bshape_0_output;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_output)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_output.buf, __pyx_t_12, __pyx_bstride_0_output);
      __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_L9:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":537
 *             output[i] = default
 * 
 *     return maybe_convert_objects(output)             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __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 = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_output));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __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_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_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_bstruct_output);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_multiget");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_output);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_164get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_164get_reverse_indexer = {__Pyx_NAMESTR("get_reverse_indexer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_164get_reverse_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_164get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indexer = 0;
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_rev_indexer;
  __pyx_t_5numpy_int32_t __pyx_v_idx;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  Py_buffer __pyx_bstruct_rev_indexer;
  Py_ssize_t __pyx_bstride_0_rev_indexer = 0;
  Py_ssize_t __pyx_bshape_0_rev_indexer = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  __pyx_t_5numpy_int32_t __pyx_t_14;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer,&__pyx_n_s__length,0};
  __Pyx_RefNannySetupContext("get_reverse_indexer");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_indexer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_length = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_rev_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_rev_indexer.buf = NULL;
  __pyx_bstruct_indexer.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
  __pyx_bshape_0_indexer = __pyx_bstruct_indexer.shape[0];

  /* "/Users/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 *)__pyx_v_indexer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __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[10]; __pyx_lineno = 7; __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __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[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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[10]; __pyx_lineno = 7; __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[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_rev_indexer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_rev_indexer, (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_bstruct_rev_indexer, (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_bstride_0_rev_indexer = __pyx_bstruct_rev_indexer.strides[0];
    __pyx_bshape_0_rev_indexer = __pyx_bstruct_rev_indexer.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_DECREF(((PyObject *)__pyx_v_rev_indexer));
  __pyx_v_rev_indexer = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 8; __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_1); __pyx_t_1 = 0;

  /* "/Users/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_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;

    /* "/Users/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_bshape_0_indexer;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_indexer)) __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_bstruct_indexer.buf, __pyx_t_12, __pyx_bstride_0_indexer));

    /* "/Users/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) {

      /* "/Users/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_bshape_0_rev_indexer;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_rev_indexer)) __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_bstruct_rev_indexer.buf, __pyx_t_14, __pyx_bstride_0_rev_indexer) = __pyx_v_i;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

  /* "/Users/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_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_bstruct_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rev_indexer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_reverse_indexer");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_rev_indexer);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_rev_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_165test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_165test = {__Pyx_NAMESTR("test"), (PyCFunction)__pyx_pf_6pandas_8_tseries_165test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_165test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  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;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_13;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("test");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_size_hint = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  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;}

  /* "/Users/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;

  /* "/Users/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();

  /* "/Users/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);

  /* "/Users/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);

  /* "/Users/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 *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __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 = 18; __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 = 18; __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 = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 18; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_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;

    /* "/Users/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));

    /* "/Users/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;
  }

  /* "/Users/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_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;

    /* "/Users/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]));

    /* "/Users/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_bshape_0_indexer;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_indexer)) __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_bstruct_indexer.buf, __pyx_t_13, __pyx_bstride_0_indexer) = (__pyx_v_table->vals[__pyx_v_k]);
  }

  /* "/Users/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);

  /* "/Users/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_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_bstruct_indexer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.test");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_166test_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_166test_str = {__Pyx_NAMESTR("test_str"), (PyCFunction)__pyx_pf_6pandas_8_tseries_166test_str, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_166test_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  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;
  Py_buffer __pyx_bstruct_indexer;
  Py_ssize_t __pyx_bstride_0_indexer = 0;
  Py_ssize_t __pyx_bshape_0_indexer = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("test_str");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_size_hint = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_indexer.buf = NULL;
  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;}

  /* "/Users/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;

  /* "/Users/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();

  /* "/Users/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);

  /* "/Users/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);

  /* "/Users/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 *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __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 = 53; __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 = 53; __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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 53; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_indexer, (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_bstruct_indexer, (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_bstride_0_indexer = __pyx_bstruct_indexer.strides[0];
    __pyx_bshape_0_indexer = __pyx_bstruct_indexer.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_DECREF(((PyObject *)__pyx_v_indexer));
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_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;

    /* "/Users/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;

    /* "/Users/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;
  }

  /* "/Users/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);

  /* "/Users/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_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_bstruct_indexer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.test_str");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_indexer);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_167obj_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_167obj_unique = {__Pyx_NAMESTR("obj_unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_167obj_unique, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_167obj_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  kh_pyset_t *__pyx_v_table;
  PyObject *__pyx_v_obj;
  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;
  PyObject *__pyx_v_uniques;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("obj_unique");
  __pyx_self = __pyx_self;
  __pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_uniques = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":101
 *         list uniques
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     uniques = []
 * 
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":102
 * 
 *     n = len(arr)
 *     uniques = []             # <<<<<<<<<<<<<<
 * 
 *     table = kh_init_pyset()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_v_uniques));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":104
 *     uniques = []
 * 
 *     table = kh_init_pyset()             # <<<<<<<<<<<<<<
 * 
 *     data = <PyObject**> arr.data
 */
  __pyx_v_table = kh_init_pyset();

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":106
 *     table = kh_init_pyset()
 * 
 *     data = <PyObject**> arr.data             # <<<<<<<<<<<<<<
 * 
 *     # size hint
 */
  __pyx_v_data = ((PyObject **)((PyArrayObject *)__pyx_v_arr)->data);

  /* "/Users/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));

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":111
 *     kh_resize_pyset(table, n // 10)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         obj = arr[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/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_bshape_0_arr;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_arr)) __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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_arr.buf, __pyx_t_4, __pyx_bstride_0_arr);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_obj);
    __pyx_v_obj = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/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));

    /* "/Users/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) {

      /* "/Users/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_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":120
 *             # Py_INCREF(<object> obj)
 * 
 *     kh_destroy_pyset(table)             # <<<<<<<<<<<<<<
 * 
 *     return None
 */
  kh_destroy_pyset(__pyx_v_table);

  /* "/Users/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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.obj_unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_obj);
  __Pyx_DECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_168int64_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_168int64_unique = {__Pyx_NAMESTR("int64_unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_168int64_unique, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_168int64_unique(PyObject *__pyx_self, PyObject *__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;
  Py_buffer __pyx_bstruct_arr;
  Py_ssize_t __pyx_bstride_0_arr = 0;
  Py_ssize_t __pyx_bshape_0_arr = 0;
  Py_buffer __pyx_bstruct_uniques;
  Py_ssize_t __pyx_bstride_0_uniques = 0;
  Py_ssize_t __pyx_bshape_0_uniques = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __Pyx_RefNannySetupContext("int64_unique");
  __pyx_self = __pyx_self;
  __pyx_v_uniques = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_uniques.buf = NULL;
  __pyx_bstruct_arr.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (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_bstride_0_arr = __pyx_bstruct_arr.strides[0];
  __pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":135
 *         ndarray[int64_t] uniques
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     uniques = np.empty(n, dtype='i8')
 * 
 */
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":136
 * 
 *     n = len(arr)
 *     uniques = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     table = kh_init_int64()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __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 = 136; __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 = 136; __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 = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 136; __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[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_uniques);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_uniques, (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_bstruct_uniques, (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_bstride_0_uniques = __pyx_bstruct_uniques.strides[0];
    __pyx_bshape_0_uniques = __pyx_bstruct_uniques.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_DECREF(((PyObject *)__pyx_v_uniques));
  __pyx_v_uniques = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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();

  /* "/Users/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);

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":141
 *     kh_resize_int64(table, n)
 * 
 *     j = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_v_j = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":143
 *     j = 0
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         obj = arr[i]
 * 
 */
  __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;

    /* "/Users/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_bshape_0_arr;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_arr)) __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_bstruct_arr.buf, __pyx_t_12, __pyx_bstride_0_arr));

    /* "/Users/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);

    /* "/Users/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) {

      /* "/Users/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));

      /* "/Users/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_bshape_0_uniques;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_uniques)) __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_bstruct_uniques.buf, __pyx_t_14, __pyx_bstride_0_uniques) = __pyx_v_obj;

      /* "/Users/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_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/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);

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__sort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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(((PyObject *)__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_1, ((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_1); __pyx_t_1 = 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_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_bstruct_arr);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_uniques);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.int64_unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_uniques);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15StringHashTable___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  int __pyx_t_1;
  kh_str_t *__pyx_t_2;
  khint_t __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_size_hint = ((PyObject *)__pyx_int_1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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) {

    /* "/Users/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 = ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table;
    __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_str(__pyx_t_2, __pyx_t_3);
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15StringHashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__cinit__");
  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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":167
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_str()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table = kh_init_str();

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

/* "/Users/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_2__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_6pandas_8_tseries_15StringHashTable_2__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table);

  __Pyx_RefNannyFinishContext();
}

/* "/Users/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(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("check_type");

  /* "/Users/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_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = is_string_object(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "/Users/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_3get_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __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_pf_6pandas_8_tseries_15StringHashTable_3get_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(((PyObject *)__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;
  }

  /* "/Users/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_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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) {

    /* "/Users/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*/ {

    /* "/Users/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(((PyObject *)__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);
    __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable *)((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->__pyx_vtab)->get_item(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), __pyx_t_1, 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_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.StringHashTable.get_item");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_iterations;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  __Pyx_RefNannySetupContext("get_iter_test");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_key = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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;

    /* "/Users/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_t_3 = __pyx_v_key;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_k = kh_get_str(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, get_c_string(__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/Users/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_4 = (__pyx_v_k != ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_4) {

      /* "/Users/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 = (((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

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

/* "/Users/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_5set_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;
  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;
  __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_pf_6pandas_8_tseries_15StringHashTable_5set_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(((PyObject *)__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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":193
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             char* buf
 * 
 */
  __pyx_v_ret = 0;

  /* "/Users/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_t_1 = __pyx_v_key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_buf = get_c_string(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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));

  /* "/Users/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;

  /* "/Users/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) {

    /* "/Users/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*/ {

    /* "/Users/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(((PyObject *)__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);
    __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_5set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_5set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_val;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  __Pyx_RefNannySetupContext("set_item");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_key = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable *)((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->__pyx_vtab)->set_item(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), __pyx_t_1, __pyx_v_val, 1); 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(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.StringHashTable.set_item");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_6get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_6get_indexer(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("get_indexer");
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __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 = 208; __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 = 208; __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 = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 208; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 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_bstruct_labels, (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_bstruct_labels.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_labels = __pyx_bstruct_labels.strides[0];
      __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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);

  /* "/Users/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 = ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_2; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_9, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_v_buf = get_c_string(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/Users/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);

    /* "/Users/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) {

      /* "/Users/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_L7;
    }
    /*else*/ {

      /* "/Users/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_L7:;
  }

  /* "/Users/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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.get_indexer");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_7unique(PyObject *__pyx_v_self, PyObject *__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;
  char *__pyx_v_buf;
  khiter_t __pyx_v_k;
  PyObject *__pyx_v_uniques = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("unique");
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":231
 *             char *buf
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __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_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/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);

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, __pyx_v_buf);

    /* "/Users/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 == ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_6) {

      /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, __pyx_v_buf, (&__pyx_v_ret));

      /* "/Users/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) {

        /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, __pyx_v_k);
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/Users/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);

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":243
 *                     kh_del_str(self.table, k)
 *                 count += 1
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 * 
 *         # return None
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_8factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_8factorize(PyObject *__pyx_v_self, PyObject *__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;
  char *__pyx_v_buf;
  khiter_t __pyx_v_k;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __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 = 251; __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 = 251; __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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 251; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 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_bstruct_labels, (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_bstruct_labels.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_labels = __pyx_bstruct_labels.strides[0];
      __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __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_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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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_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_bstruct_counts, (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_bstruct_counts.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_counts = __pyx_bstruct_counts.strides[0];
      __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_2; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_10, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/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);

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, __pyx_v_buf);

    /* "/Users/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 != ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_12) {

      /* "/Users/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 = (((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);

      /* "/Users/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_bshape_0_labels;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/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_bshape_0_counts;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_counts)) __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_bshape_0_counts;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_15, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, __pyx_v_buf, (&__pyx_v_ret));

      /* "/Users/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) {

        /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table, __pyx_v_k);
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/Users/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
 */
      (((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self)->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/Users/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;}

      /* "/Users/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_bshape_0_labels;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_16, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/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_bshape_0_counts;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_17, __pyx_bstride_0_counts) = 1;

      /* "/Users/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_L7:;
  }

  /* "/Users/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(((PyObject *)__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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_reverse);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14Int32HashTable___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  int __pyx_t_1;
  kh_int32_t *__pyx_t_2;
  khint_t __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_size_hint = ((PyObject *)__pyx_int_1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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) {

    /* "/Users/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 = ((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table;
    __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_int32(__pyx_t_2, __pyx_t_3);
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14Int32HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__cinit__");
  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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":293
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_int32()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  ((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table = kh_init_int32();

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

/* "/Users/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_2__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_6pandas_8_tseries_14Int32HashTable_2__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table);

  __Pyx_RefNannyFinishContext();
}

/* "/Users/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(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("check_type");

  /* "/Users/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_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = is_string_object(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "/Users/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_3get_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __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_pf_6pandas_8_tseries_14Int32HashTable_3get_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(((PyObject *)__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;
  }

  /* "/Users/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);

  /* "/Users/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) {

    /* "/Users/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*/ {

    /* "/Users/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(((PyObject *)__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);
    __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  __pyx_t_5numpy_int32_t __pyx_v_val;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_item");
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable *)((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->__pyx_vtab)->get_item(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int32_t __pyx_v_key;
  Py_ssize_t __pyx_v_iterations;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  __Pyx_RefNannySetupContext("get_iter_test");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int32(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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;

  /* "/Users/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;

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/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 != ((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_3) {

      /* "/Users/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 = (((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

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

/* "/Users/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_5set_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __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_pf_6pandas_8_tseries_14Int32HashTable_5set_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(((PyObject *)__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;
  }

  /* "/Users/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;

  /* "/Users/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));

  /* "/Users/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;

  /* "/Users/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) {

    /* "/Users/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*/ {

    /* "/Users/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(((PyObject *)__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);
    __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_5set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_5set_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;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  __Pyx_RefNannySetupContext("set_item");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int32(PyTuple_GET_ITEM(__pyx_args, 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(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable *)((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->__pyx_vtab)->set_item(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_6map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_6map_locations(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/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_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values));

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

    /* "/Users/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):
 */
    (((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.map_locations");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_7lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_7lookup(PyObject *__pyx_v_self, PyObject *__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;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __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 = 346; __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 = 346; __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 = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 346; __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[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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[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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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_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;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values));

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/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 != ((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_10) {

      /* "/Users/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_bshape_0_locs;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_locs)) __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_bstruct_locs.buf, __pyx_t_11, __pyx_bstride_0_locs) = (((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/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_bshape_0_locs;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_locs)) __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_bstruct_locs.buf, __pyx_t_12, __pyx_bstride_0_locs) = -1;
    }
    __pyx_L7:;
  }

  /* "/Users/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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.lookup");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_8factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_8factorize(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __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 = 361; __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 = 361; __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 361; __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 = 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_1, ((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 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); 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_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 = 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_bstruct_labels, (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_bstruct_labels.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_labels = __pyx_bstruct_labels.strides[0];
      __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/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_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __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_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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((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_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_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_bstruct_counts, (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_bstruct_counts.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_counts = __pyx_bstruct_counts.strides[0];
      __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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;

  /* "/Users/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_2 = __pyx_v_n;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_2; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "/Users/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_bshape_0_values;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_values)) __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_bstruct_values.buf, __pyx_t_10, __pyx_bstride_0_values));

    /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/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 != ((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_12) {

      /* "/Users/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 = (((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);

      /* "/Users/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_bshape_0_labels;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_13, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/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_bshape_0_counts;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_counts)) __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_bshape_0_counts;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_15, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/Users/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) {

        /* "/Users/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(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table, __pyx_v_k);
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/Users/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
 */
      (((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/Users/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;

      /* "/Users/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_bshape_0_labels;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_16, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/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_bshape_0_counts;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_counts)) __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_bstruct_counts.buf, __pyx_t_17, __pyx_bstride_0_counts) = 1;

      /* "/Users/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_L7:;
  }

  /* "/Users/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(((PyObject *)__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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __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;
}

/* "/Users/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14Int64HashTable___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  int __pyx_t_1;
  kh_int64_t *__pyx_t_2;
  khint_t __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_size_hint = ((PyObject *)__pyx_int_1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/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) {

    /* "/Users/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 = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table;
    __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_int64(__pyx_t_2, __pyx_t_3);
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14Int64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__cinit__");
  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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":399
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_int64()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table = kh_init_int64();

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

/* "/Users/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_2__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_6pandas_8_tseries_14Int64HashTable_2__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":402
 * 
 *     def __dealloc__(self):
 *         kh_destroy_int64(self.table)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_item(self, int64_t val):
 */
  kh_destroy_int64(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table);

  __Pyx_RefNannyFinishContext();
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":404
 *         kh_destroy_int64(self.table)
 * 
 *     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_3get_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __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 = 404; __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_pf_6pandas_8_tseries_14Int64HashTable_3get_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 = 404; __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 404; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":406
 *     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);

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":407
 *         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) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":408
 *         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 = 408; __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*/ {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":410
 *             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 = 410; __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 = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 410; __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);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 410; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":404
 *         kh_destroy_int64(self.table)
 * 
 *     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_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  __pyx_t_5numpy_int64_t __pyx_v_val;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_item");
  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 = 404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_item");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable *)((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->__pyx_vtab)->get_item(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 404; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":412
 *             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_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_key;
  Py_ssize_t __pyx_v_iterations;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  __Pyx_RefNannySetupContext("get_iter_test");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 412; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_iter_test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __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 = 412; __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int64(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_iter_test");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":413
 * 
 *     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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":414
 *     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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":415
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":416
 *         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 != ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":417
 *             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 = (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":419
 *                 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_5set_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __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 = 419; __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_pf_6pandas_8_tseries_14Int64HashTable_5set_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 = 419; __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 = 419; __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 = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 419; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":422
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 * 
 *         k = kh_put_int64(self.table, key, &ret)
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":424
 *             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));

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":425
 * 
 *         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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":426
 *         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) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":427
 *         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*/ {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":429
 *             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 = 429; __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 = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 429; __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);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 429; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":419
 *                 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_5set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_5set_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;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  __Pyx_RefNannySetupContext("set_item");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_item") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __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 = 419; __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 = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int64(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __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 = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.set_item");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable *)((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->__pyx_vtab)->set_item(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":431
 *             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_6map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_6map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_keys = 0;
  PyArrayObject *__pyx_v_values = 0;
  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;
  Py_buffer __pyx_bstruct_keys;
  Py_ssize_t __pyx_bstride_0_keys = 0;
  Py_ssize_t __pyx_bshape_0_keys = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__keys,&__pyx_n_s__values,0};
  __Pyx_RefNannySetupContext("map");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "map") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 431; __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 {
    __pyx_v_keys = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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 = 431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.map");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_keys.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 431; __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 = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_keys, (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 = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_keys = __pyx_bstruct_keys.strides[0];
  __pyx_bshape_0_keys = __pyx_bstruct_keys.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":433
 *     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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":434
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t key
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":438
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             key = keys[i]
 *             k = kh_put_int64(self.table, key, &ret)
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":439
 * 
 *         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_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_bshape_0_keys;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_keys)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_key = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_keys.buf, __pyx_t_4, __pyx_bstride_0_keys));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":440
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_key, (&__pyx_v_ret));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":441
 *             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_6 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_bshape_0_values;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]) = ((Py_ssize_t)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_6, __pyx_bstride_0_values)));
  }

  __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_bstruct_keys);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.map");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_keys);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":443
 *             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_7map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_7map_locations(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":445
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":446
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":450
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_put_int64(self.table, val, &ret)
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":451
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_put_int64(self.table, 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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":452
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":453
 *             val = values[i]
 *             k = kh_put_int64(self.table, val, &ret)
 *             self.table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, ndarray[int64_t] values):
 */
    (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.map_locations");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":455
 *             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_8lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_8lookup(PyObject *__pyx_v_self, PyObject *__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;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":457
 *     def lookup(self, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":458
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":461
 *             int64_t val
 *             khiter_t k
 *             ndarray[int64_t] locs = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *         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[11]; __pyx_lineno = 461; __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 = 461; __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 = 461; __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 = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 461; __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[11]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 461; __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[11]; __pyx_lineno = 461; __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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":463
 *             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_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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":464
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_values)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":465
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":466
 *             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 != ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_10) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":467
 *             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_bshape_0_locs;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_locs)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_locs.buf, __pyx_t_11, __pyx_bstride_0_locs) = (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":469
 *                 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_bshape_0_locs;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_locs)) __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_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_locs.buf, __pyx_t_12, __pyx_bstride_0_locs) = -1;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":471
 *                 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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.lookup");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":473
 *         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_9lookup_i4(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_9lookup_i4(PyObject *__pyx_v_self, PyObject *__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;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("lookup_i4");
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":475
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":476
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":479
 *             int64_t val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         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[11]; __pyx_lineno = 479; __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 = 479; __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 = 479; __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 = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 479; __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[11]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 479; __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[11]; __pyx_lineno = 479; __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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":481
 *             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_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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":482
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_values)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":483
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":484
 *             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 != ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_10) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":485
 *             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_bshape_0_locs;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_locs)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_locs.buf, __pyx_t_11, __pyx_bstride_0_locs) = (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":487
 *                 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_bshape_0_locs;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_locs)) __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_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_locs.buf, __pyx_t_12, __pyx_bstride_0_locs) = -1;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":489
 *                 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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.lookup_i4");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":491
 *         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_10factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_10factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_v_reverse;
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_counts;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_v_reverse = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_labels = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_counts = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":492
 * 
 *     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 = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_v_reverse));
  __pyx_v_reverse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":493
 *     def factorize(self, ndarray[object] values):
 *         reverse = {}
 *         labels, counts = self.get_labels(values, reverse, 0)             # <<<<<<<<<<<<<<
 *         return reverse, labels, counts
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 493; __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 = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values);
  __Pyx_GIVEREF(__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 = 493; __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 (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
    PyObject* tuple = __pyx_t_3;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_EndUnpack(__pyx_t_4, 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":494
 *         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 = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_reverse);
  __Pyx_DECREF(__pyx_v_labels);
  __Pyx_DECREF(__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":496
 *         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_11get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_11get_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;
  Py_ssize_t __pyx_v_na_sentinel;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels;
  PyArrayObject *__pyx_v_counts;
  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;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  Py_ssize_t __pyx_t_20;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0};
  __Pyx_RefNannySetupContext("get_labels");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 496; __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 = 496; __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 = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_labels") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 496; __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 = 497; __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 = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_uniques = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_na_sentinel = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_na_sentinel == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 497; __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 = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  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;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), (&PyList_Type), 1, "uniques", 1))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":499
 *                    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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":502
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":503
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":507
 *             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 = 507; __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 = 507; __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 = 507; __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 507; __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 = 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[11]; __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_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __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_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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
    __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_labels));
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":508
 * 
 *         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 = 508; __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 = 508; __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 = 508; __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 = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 508; __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 = 508; __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 = 508; __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 = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 508; __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_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 = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":510
 *         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_2 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":511
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_values)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_14, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":512
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":513
 *             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 != ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_15) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":514
 *             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 = (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":515
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_16, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":516
 *                 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_bshape_0_counts;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_counts)) __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_t_18 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_bshape_0_counts;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_counts)) __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_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_18, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_17, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":518
 *                 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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":519
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 labels[i] = count
 */
      (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":520
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 520; __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 = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = PyList_Append(__pyx_v_uniques, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":521
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_bshape_0_labels;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_19, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":522
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_20 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_bshape_0_counts;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_20, __pyx_bstride_0_counts) = 1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":523
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L8:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":525
 *                 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 = 525; __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 = 525; __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 = 525; __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 = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":527
 *         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_12get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_12get_labels_groupby(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_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels;
  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;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,0};
  __Pyx_RefNannySetupContext("get_labels_groupby");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_labels_groupby") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 527; __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 {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_uniques = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 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 = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels_groupby");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 527; __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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":529
 *     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 *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":531
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":532
 *             ndarray[int32_t] labels
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":536
 *             khiter_t k
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         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[11]; __pyx_lineno = 536; __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 = 536; __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 = 536; __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 = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 536; __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 = 536; __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 = 536; __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[11]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 536; __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 = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
    __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_labels));
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":538
 *         labels = np.empty(n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":539
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_values)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_13, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":542
 * 
 *             # specific for groupby
 *             if val < 0:             # <<<<<<<<<<<<<<
 *                 labels[i] = -1
 *                 continue
 */
    __pyx_t_14 = (__pyx_v_val < 0);
    if (__pyx_t_14) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":543
 *             # 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_bshape_0_labels;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_15, __pyx_bstride_0_labels) = -1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":544
 *             if val < 0:
 *                 labels[i] = -1
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             k = kh_get_int64(self.table, val)
 */
      goto __pyx_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":546
 *                 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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":547
 * 
 *             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 != ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_14) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":548
 *             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 = (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":549
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_16, __pyx_bstride_0_labels) = __pyx_v_idx;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":551
 *                 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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":552
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 labels[i] = count
 */
      (((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":553
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 count += 1
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 553; __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 = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyList_Append(__pyx_v_uniques, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":554
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_bshape_0_labels;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_labels)) __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_bstruct_labels.buf, __pyx_t_17, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":555
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":557
 *                 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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels_groupby");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":559
 *         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_13unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_13unique(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("unique");
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":561
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":562
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_v_count = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":563
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":566
 *             int64_t val
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 * 
 *         # TODO: kvec
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":570
 *         # TODO: kvec
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":571
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":572
 *         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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":573
 *             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 == ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_6) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":574
 *             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(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":575
 *             if k == self.table.n_buckets:
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":576
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 uniques.append(val)
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return uniques
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":578
 *                 count += 1
 * 
 *         return uniques             # <<<<<<<<<<<<<<
 * 
 * ONAN = np.nan
 */
  __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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":587
 *         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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_16Float64HashTable___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  int __pyx_t_1;
  kh_float64_t *__pyx_t_2;
  khint_t __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_size_hint = values[0];
  } else {
    __pyx_v_size_hint = ((PyObject *)__pyx_int_1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.__init__");
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":588
 * 
 *     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) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":589
 *     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 = ((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table;
    __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_float64(__pyx_t_2, __pyx_t_3);
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":591
 *             kh_resize_float64(self.table, size_hint)
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = kh_init_float64()
 * 
 */

static int __pyx_pf_6pandas_8_tseries_16Float64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_16Float64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__cinit__");
  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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":592
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_float64()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  ((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table = kh_init_float64();

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":594
 *         self.table = kh_init_float64()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_float64(self.table)
 * 
 */

static void __pyx_pf_6pandas_8_tseries_16Float64HashTable_2__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_6pandas_8_tseries_16Float64HashTable_2__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":595
 * 
 *     def __dealloc__(self):
 *         kh_destroy_float64(self.table)             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[float64_t] values):
 */
  kh_destroy_float64(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table);

  __Pyx_RefNannyFinishContext();
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":597
 *         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_3factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_3factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_v_uniques;
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_counts;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_v_uniques = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_labels = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_counts = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":598
 * 
 *     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 = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_v_uniques));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":599
 *     def factorize(self, ndarray[float64_t] values):
 *         uniques = []
 *         labels, counts = self.get_labels(values, uniques, 0, -1)             # <<<<<<<<<<<<<<
 *         return uniques, labels, counts
 * 
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable *)((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->__pyx_vtab)->get_labels(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_t_1), __pyx_v_uniques, __pyx_t_2, -1, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
    PyObject* tuple = __pyx_t_3;
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_4;
    __pyx_t_4 = 0;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":600
 *         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_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques));
  __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_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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_uniques);
  __Pyx_DECREF(__pyx_v_labels);
  __Pyx_DECREF(__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":602
 *         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_4get_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;
  PyArrayObject *__pyx_v_counts;
  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;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.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 = 602; __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_pf_6pandas_8_tseries_16Float64HashTable_4get_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 = 602; __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 = 602; __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 = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 602; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":605
 *                      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_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_5;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":608
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":609
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             float64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":613
 *             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 = 613; __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 = 613; __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 = 613; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 613; __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 = 613; __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 = 613; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 613; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
    __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_labels));
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":614
 * 
 *         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 = 614; __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 = 614; __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 = 614; __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 614; __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 = 614; __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 = 614; __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 614; __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":616
 *         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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":617
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_values)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_14, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":619
 *             val = values[i]
 * 
 *             if val != val:             # <<<<<<<<<<<<<<
 *                 labels[i] = na_sentinel
 *                 continue
 */
    __pyx_t_15 = (__pyx_v_val != __pyx_v_val);
    if (__pyx_t_15) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":620
 * 
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_16, __pyx_bstride_0_labels) = __pyx_v_na_sentinel;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":621
 *             if val != val:
 *                 labels[i] = na_sentinel
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             k = kh_get_float64(self.table, val)
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":623
 *                 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);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":624
 * 
 *             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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":625
 *             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]);

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":626
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_17, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":627
 *                 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_bshape_0_counts;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 627; __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_bshape_0_counts;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_19, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_18, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":629
 *                 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));

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":630
 *             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;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":631
 *                 k = kh_put_float64(self.table, val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 631; __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 = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":632
 *                 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_bshape_0_labels;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_20, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":633
 *                 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_bshape_0_counts;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_21, __pyx_bstride_0_counts) = 1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":634
 *                 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:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":636
 *                 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 = 636; __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 = 636; __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 = 636; __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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.get_labels");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":602
 *         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_4get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_4get_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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0};
  __Pyx_RefNannySetupContext("get_labels");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 602; __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 = 602; __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 = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_labels") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 602; __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 = 603; __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 = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_uniques = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int32(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_na_sentinel == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 603; __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 = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.get_labels");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 602; __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 = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_uniques);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_v_count_prior;
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable *)((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->__pyx_vtab)->get_labels(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_t_1), ((PyObject*)__pyx_t_2), __pyx_t_3, __pyx_v_na_sentinel, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.get_labels");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":638
 *         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_5map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_5map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  khiter_t __pyx_v_k;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":640
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":641
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             khiter_t k
 * 
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":644
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             k = kh_put_float64(self.table, values[i], &ret)
 *             self.table.vals[k] = i
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":645
 * 
 *         for i in range(n):
 *             k = kh_put_float64(self.table, values[i], &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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_k = kh_put_float64(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values)), (&__pyx_v_ret));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":646
 *         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):
 */
    (((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.map_locations");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":648
 *             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_6lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_6lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":650
 *     def lookup(self, ndarray[float64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             float64_t val
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":651
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             float64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":654
 *             float64_t val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         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[11]; __pyx_lineno = 654; __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 = 654; __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 = 654; __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 = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 654; __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 = 654; __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 = 654; __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[11]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 654; __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 = 654; __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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":656
 *             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_2 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_2; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":657
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_values)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_9, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":658
 *         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(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table, __pyx_v_val);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":659
 *             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 != ((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_11) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":660
 *             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_bshape_0_locs;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_locs)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_locs.buf, __pyx_t_12, __pyx_bstride_0_locs) = (((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":662
 *                 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_bshape_0_locs;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_locs)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_locs.buf, __pyx_t_13, __pyx_bstride_0_locs) = -1;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":664
 *                 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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.lookup");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":666
 *         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_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_7unique(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("unique");
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":668
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":669
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             float64_t val
 */
  __pyx_v_count = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":670
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":673
 *             float64_t val
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 *             bint seen_na = 0
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":674
 *             khiter_t k
 *             list uniques = []
 *             bint seen_na = 0             # <<<<<<<<<<<<<<
 * 
 *         # TODO: kvec
 */
  __pyx_v_seen_na = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":678
 *         # TODO: kvec
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":679
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":681
 *             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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":682
 * 
 *             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(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table, __pyx_v_val);

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":683
 *             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 == ((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table->n_buckets);
      if (__pyx_t_6) {

        /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":684
 *                 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(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self)->table, __pyx_v_val, (&__pyx_v_ret));

        /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":685
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_float64(self.table, val, &ret)
 *                     uniques.append(val)             # <<<<<<<<<<<<<<
 *                     count += 1
 *             elif not seen_na:
 */
        if (unlikely(__pyx_v_uniques == Py_None)) {
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
        }
        __pyx_t_1 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":686
 *                     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_L8;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":687
 *                     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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":688
 *                     count += 1
 *             elif not seen_na:
 *                 seen_na = 1             # <<<<<<<<<<<<<<
 *                 uniques.append(ONAN)
 * 
 */
      __pyx_v_seen_na = 1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":689
 *             elif not seen_na:
 *                 seen_na = 1
 *                 uniques.append(ONAN)             # <<<<<<<<<<<<<<
 * 
 *         return uniques
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ONAN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":691
 *                 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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":698
 *         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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_17PyObjectHashTable___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  kh_pymap_t *__pyx_t_1;
  khint_t __pyx_t_2;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_size_hint = values[0];
  } else {
    __pyx_v_size_hint = ((PyObject *)__pyx_int_1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 698; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.__init__");
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":699
 * 
 *     def __init__(self, size_hint=1):
 *         self.table = kh_init_pymap()             # <<<<<<<<<<<<<<
 *         kh_resize_pymap(self.table, size_hint)
 * 
 */
  ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table = kh_init_pymap();

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":700
 *     def __init__(self, size_hint=1):
 *         self.table = kh_init_pymap()
 *         kh_resize_pymap(self.table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table;
  __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 = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  kh_resize_pymap(__pyx_t_1, __pyx_t_2);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":702
 *         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_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_1__dealloc__(PyObject *__pyx_v_self) {
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":703
 * 
 *     def __dealloc__(self):
 *         if self.table is not NULL:             # <<<<<<<<<<<<<<
 *             self.destroy()
 * 
 */
  __pyx_t_1 = (((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table != NULL);
  if (__pyx_t_1) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":704
 *     def __dealloc__(self):
 *         if self.table is not NULL:
 *             self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     cpdef destroy(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->__pyx_vtab)->destroy(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.__dealloc__");
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":706
 *             self.destroy()
 * 
 *     cpdef destroy(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_pymap(self.table)
 *         self.table = NULL
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_2destroy(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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __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 = 706; __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_pf_6pandas_8_tseries_17PyObjectHashTable_2destroy)) {
      __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 = 706; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":707
 * 
 *     cpdef destroy(self):
 *         kh_destroy_pymap(self.table)             # <<<<<<<<<<<<<<
 *         self.table = NULL
 * 
 */
  kh_destroy_pymap(__pyx_v_self->table);

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":708
 *     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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":706
 *             self.destroy()
 * 
 *     cpdef destroy(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_pymap(self.table)
 *         self.table = NULL
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_2destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_2destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("destroy");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->__pyx_vtab)->destroy(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 706; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":710
 *         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_3get_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __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 = 710; __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_pf_6pandas_8_tseries_17PyObjectHashTable_3get_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 710; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":712
 *     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));

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":713
 *         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) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":714
 *         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 = 714; __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*/ {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":716
 *             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 = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 716; __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);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 716; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":710
 *         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_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_3get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->__pyx_vtab)->get_item(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.PyObjectHashTable.get_item");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":718
 *             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_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_4get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_iterations;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  __Pyx_RefNannySetupContext("get_iter_test");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_iter_test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 718; __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 = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_key = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 718; __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 = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_iter_test");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":720
 *     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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":721
 *         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(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table, ((PyObject *)__pyx_v_key));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":722
 *         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 != ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_3) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":723
 *             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 = (((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":725
 *                 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_5set_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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __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 = 725; __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_pf_6pandas_8_tseries_17PyObjectHashTable_5set_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 = 725; __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 725; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":728
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             char* buf
 * 
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":731
 *             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));

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":733
 *         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) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":734
 *         # 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*/ {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":736
 *             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 = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 736; __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);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 736; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":725
 *                 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_5set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_5set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_val;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  __Pyx_RefNannySetupContext("set_item");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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 = 725; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_item") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 725; __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_key = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 725; __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.set_item");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->__pyx_vtab)->set_item(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), __pyx_t_1, __pyx_v_val, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("pandas._tseries.PyObjectHashTable.set_item");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":738
 *             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_6map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_6map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  PyObject *__pyx_v_val;
  khiter_t __pyx_v_k;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":740
 *     def map_locations(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":741
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":745
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":746
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":747
 *         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(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":748
 *             val = values[i]
 *             k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *             self.table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, ndarray[object] values):
 */
    (((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.map_locations");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":750
 *             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_7lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_7lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  PyObject *__pyx_v_val;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":752
 *     def lookup(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":753
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":756
 *             object val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         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[11]; __pyx_lineno = 756; __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 = 756; __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 = 756; __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 = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 756; __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[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __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[11]; __pyx_lineno = 756; __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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":758
 *             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_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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":759
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_values)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":760
 *         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(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table, ((PyObject *)__pyx_v_val));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":761
 *             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 != ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table->n_buckets);
    if (__pyx_t_10) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":762
 *             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_bshape_0_locs;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_bshape_0_locs)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_locs.buf, __pyx_t_11, __pyx_bstride_0_locs) = (((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table->vals[__pyx_v_k]);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":764
 *                 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_bshape_0_locs;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_locs)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_locs.buf, __pyx_t_12, __pyx_bstride_0_locs) = -1;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":766
 *                 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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.lookup");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":768
 *         return locs
 * 
 *     def lookup2(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_8lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_8lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("lookup2");
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":770
 *     def lookup2(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":771
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":775
 *             khiter_t k
 *             long hval
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         # 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[11]; __pyx_lineno = 775; __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 = 775; __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 = 775; __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 = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 775; __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[11]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 775; __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[11]; __pyx_lineno = 775; __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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":782
 *             # 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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.lookup2");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":784
 *         return locs
 * 
 *     def unique(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_9unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_9unique(PyObject *__pyx_v_self, PyObject *__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;
  khiter_t __pyx_v_k;
  PyObject *__pyx_v_uniques = 0;
  int __pyx_v_seen_na;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("unique");
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":786
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":787
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":788
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":791
 *             object val
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 *             bint seen_na = 0
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":792
 *             khiter_t k
 *             list uniques = []
 *             bint seen_na = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_v_seen_na = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":794
 *             bint seen_na = 0
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":795
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":797
 *             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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":798
 * 
 *             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(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table, ((PyObject *)__pyx_v_val));

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":799
 *             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 == ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table->n_buckets);
      if (__pyx_t_6) {

        /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":800
 *                 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(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret));

        /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":801
 *                 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
 */
        if (unlikely(__pyx_v_uniques == Py_None)) {
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
        }
        __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L8;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":802
 *                     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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":803
 *                     uniques.append(val)
 *             elif not seen_na:
 *                 seen_na = 1             # <<<<<<<<<<<<<<
 *                 uniques.append(ONAN)
 * 
 */
      __pyx_v_seen_na = 1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":804
 *             elif not seen_na:
 *                 seen_na = 1
 *                 uniques.append(ONAN)             # <<<<<<<<<<<<<<
 * 
 *         return uniques
 */
      if (unlikely(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ONAN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":806
 *                 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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":808
 *         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_10get_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;
  PyArrayObject *__pyx_v_counts;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  PyObject *__pyx_v_val;
  khiter_t __pyx_v_k;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.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 = 808; __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_pf_6pandas_8_tseries_17PyObjectHashTable_10get_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 = 808; __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 = 808; __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 = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 808; __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;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":811
 *                      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_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_5;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":814
 *             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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":815
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":819
 *             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 = 819; __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 = 819; __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 = 819; __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 = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 819; __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 = 819; __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 = 819; __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 = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __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 = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
    __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_labels));
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":820
 * 
 *         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 = 820; __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 = 820; __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 = 820; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 820; __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 = 820; __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 = 820; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":822
 *         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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":823
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_values)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_14, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":825
 *             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 = 825; __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 = 825; __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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":826
 * 
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_18, __pyx_bstride_0_labels) = __pyx_v_na_sentinel;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":827
 *             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:;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":829
 *                 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));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":830
 * 
 *             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) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":831
 *             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]);

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":832
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_19, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":833
 *                 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_bshape_0_counts;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 833; __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_bshape_0_counts;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_21, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_20, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":835
 *                 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));

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":836
 *             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;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":837
 *                 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(__pyx_v_uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_8 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":838
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_22 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_22 < 0) {
        __pyx_t_22 += __pyx_bshape_0_labels;
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_22 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_22, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":839
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_23 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_bshape_0_counts;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_23, __pyx_bstride_0_counts) = 1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":840
 *                 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:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":842
 *                 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 = 842; __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 = 842; __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 = 842; __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 = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_labels");
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":808
 *         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_10get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_10get_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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0};
  __Pyx_RefNannySetupContext("get_labels");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 808; __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 = 808; __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 = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_labels") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __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 = 809; __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 = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_uniques = ((PyObject*)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int32(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_na_sentinel == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 809; __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 = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_labels");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __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 = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_uniques);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_v_count_prior;
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self)->__pyx_vtab)->get_labels(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_t_1), ((PyObject*)__pyx_t_2), __pyx_t_3, __pyx_v_na_sentinel, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_labels");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":867
 *         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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_10Factorizer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 867; __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 {
    __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 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 = 867; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.__init__");
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":868
 * 
 *     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 = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 868; __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(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":869
 *     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 = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":870
 *         self.table = PyObjectHashTable(size_hint)
 *         self.uniques = []
 *         self.count = 0             # <<<<<<<<<<<<<<
 * 
 *     def get_count(self):
 */
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":872
 *         self.count = 0
 * 
 *     def get_count(self):             # <<<<<<<<<<<<<<
 *         return self.count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_1get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_1get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_count");

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":873
 * 
 *     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(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 873; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":875
 *         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_2factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_2factorize(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;
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_counts;
  PyObject *__pyx_v_sorter;
  PyObject *__pyx_v_reverse_indexer;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  __pyx_t_5numpy_int32_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,&__pyx_n_s__na_sentinel,0};
  __Pyx_RefNannySetupContext("factorize");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    values[1] = __pyx_k_90;
    values[2] = ((PyObject *)__pyx_int_neg_1);
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_args), "factorize") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 875; __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 {
    __pyx_v_sort = __pyx_k_90;
    __pyx_v_na_sentinel = ((PyObject *)__pyx_int_neg_1);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: __pyx_v_na_sentinel = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: __pyx_v_sort = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 875; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.factorize");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_labels = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_counts = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_sorter = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_reverse_indexer = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":876
 * 
 *     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_values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques);
  __Pyx_INCREF(__pyx_t_2);

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":877
 *     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_3 = ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->count;
  __pyx_t_4 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_na_sentinel); if (unlikely((__pyx_t_4 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table->__pyx_vtab)->get_labels(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table, ((PyArrayObject *)__pyx_t_1), ((PyObject*)__pyx_t_2), __pyx_t_3, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
    PyObject* tuple = __pyx_t_5;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":876
 * 
 *     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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":880
 * 
 *         # 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 = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_7) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":881
 *         # 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_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_80); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 881; __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[11]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
    __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
    __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 881; __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_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 = 881; __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 = 881; __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_sorter);
    __pyx_v_sorter = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":882
 *         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 = 882; __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 = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 882; __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[11]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[11]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 882; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_reverse_indexer);
    __pyx_v_reverse_indexer = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":883
 *             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 = 883; __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 = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__arange); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 883; __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 = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 883; __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_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 883; __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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":885
 *             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 = 885; __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 = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 885; __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;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":886
 * 
 *             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 = 886; __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 = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 886; __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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":888
 *             counts = counts.take(sorter)
 * 
 *         self.count = len(counts)             # <<<<<<<<<<<<<<
 *         return labels, counts
 * 
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_counts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->count = __pyx_t_3;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":889
 * 
 *         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 = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Factorizer.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_labels);
  __Pyx_DECREF(__pyx_v_counts);
  __Pyx_DECREF(__pyx_v_sorter);
  __Pyx_DECREF(__pyx_v_reverse_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":891
 *         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_3unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_3unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("unique");
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":893
 *     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 *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table), __pyx_n_s__unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 893; __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 = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values);
  __Pyx_GIVEREF(__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 = 893; __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_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Factorizer.unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":863
 * 
 *     cdef public:
 *         PyObjectHashTable table             # <<<<<<<<<<<<<<
 *         list uniques
 *         Py_ssize_t count
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5table___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5table___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__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;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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 = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)Py_None);

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":864
 *     cdef public:
 *         PyObjectHashTable table
 *         list uniques             # <<<<<<<<<<<<<<
 *         Py_ssize_t count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_7uniques___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_7uniques___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__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;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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 = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->uniques = ((PyObject*)Py_None);

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":865
 *         PyObjectHashTable table
 *         list uniques
 *         Py_ssize_t count             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, size_hint):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5count___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5count___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 865; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_5count_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_10Factorizer_5count_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  __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 = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self)->count = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.count.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":902
 *         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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 902; __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 {
    __pyx_v_size_hint = PyTuple_GET_ITEM(__pyx_args, 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 = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.__init__");
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":903
 * 
 *     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 = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 903; __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(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":904
 *     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 = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":905
 *         self.table = Int64HashTable(size_hint)
 *         self.uniques = []
 *         self.count = 0             # <<<<<<<<<<<<<<
 * 
 *     def get_count(self):
 */
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":907
 *         self.count = 0
 * 
 *     def get_count(self):             # <<<<<<<<<<<<<<
 *         return self.count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_1get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_1get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_count");

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":908
 * 
 *     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(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 908; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":910
 *         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_2factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_2factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_sort = 0;
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_counts;
  PyObject *__pyx_v_sorter;
  PyObject *__pyx_v_reverse_indexer;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  PyObject *__pyx_t_7 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,0};
  __Pyx_RefNannySetupContext("factorize");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_91;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "factorize") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_sort = values[1];
  } else {
    __pyx_v_sort = __pyx_k_91;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_sort = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 910; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.factorize");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_labels = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_counts = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_sorter = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_reverse_indexer = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":911
 * 
 *     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 *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table), __pyx_n_s__get_labels); 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);

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":912
 *     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(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 912; __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 = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
  __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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 = 911; __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 (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
    PyObject* tuple = __pyx_t_2;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":911
 * 
 *     def factorize(self, ndarray[int64_t] values, sort=False):
 *         labels, counts = self.table.get_labels(values, self.uniques,             # <<<<<<<<<<<<<<
 *                                                self.count, -1)
 * 
 */
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_4, 1); 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);
    if (__Pyx_EndUnpack(__pyx_t_4, 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":915
 * 
 *         # sort on
 *         if sort:             # <<<<<<<<<<<<<<
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":916
 *         # 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_80); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 916; __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 = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
    __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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 = 916; __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 = 916; __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 = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_sorter);
    __pyx_v_sorter = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":917
 *         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 = 917; __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 = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 917; __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 = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 917; __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 = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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_DECREF(__pyx_v_reverse_indexer);
    __pyx_v_reverse_indexer = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":918
 *             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_7 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 918; __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 = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 918; __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 = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 918; __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 = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":920
 *             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 = 920; __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 = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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_7;
    __pyx_t_7 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":921
 * 
 *             labels = reverse_indexer.take(labels)
 *             counts = counts.take(sorter)             # <<<<<<<<<<<<<<
 * 
 *         self.count = len(counts)
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_counts, __pyx_n_s__take); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_7, ((PyObject *)__pyx_t_1), NULL); 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_7); __pyx_t_7 = 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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":923
 *             counts = counts.take(sorter)
 * 
 *         self.count = len(counts)             # <<<<<<<<<<<<<<
 *         return labels, counts
 * 
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_counts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->count = __pyx_t_6;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":924
 * 
 *         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 = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_labels);
  __Pyx_DECREF(__pyx_v_counts);
  __Pyx_DECREF(__pyx_v_sorter);
  __Pyx_DECREF(__pyx_v_reverse_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":898
 * 
 *     cdef public:
 *         Int64HashTable table             # <<<<<<<<<<<<<<
 *         list uniques
 *         Py_ssize_t count
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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 = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)Py_None);

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":899
 *     cdef public:
 *         Int64HashTable table
 *         list uniques             # <<<<<<<<<<<<<<
 *         Py_ssize_t count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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 = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->uniques = ((PyObject*)Py_None);

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":900
 *         Int64HashTable table
 *         list uniques
 *         Py_ssize_t count             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, size_hint):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 900; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  __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 = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self)->count = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.count.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":933
 *         Py_ssize_t count
 * 
 *     def __init__(self, table=None, uniques=None):             # <<<<<<<<<<<<<<
 *         if table is None:
 *             self.table = {}
 */

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_uniques = 0;
  int __pyx_r;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,&__pyx_n_s__uniques,0};
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_table = values[0];
    __pyx_v_uniques = values[1];
  } else {
    __pyx_v_table = ((PyObject *)Py_None);
    __pyx_v_uniques = ((PyObject *)Py_None);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_uniques = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_table = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.__init__");
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":934
 * 
 *     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) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":935
 *     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 = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table);
    __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table));
    ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":937
 *             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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_table);
    __Pyx_GIVEREF(__pyx_v_table);
    __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table);
    __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table));
    ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table = ((PyObject*)__pyx_v_table);
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":939
 *             self.table = table
 * 
 *         if uniques is None:             # <<<<<<<<<<<<<<
 *             self.uniques = []
 *             self.count = 0
 */
  __pyx_t_1 = (__pyx_v_uniques == Py_None);
  if (__pyx_t_1) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":940
 * 
 *         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 = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques);
    __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
    ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":941
 *         if uniques is None:
 *             self.uniques = []
 *             self.count = 0             # <<<<<<<<<<<<<<
 *         else:
 *             self.uniques = uniques
 */
    ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count = 0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":943
 *             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 = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_uniques);
    __Pyx_GIVEREF(__pyx_v_uniques);
    __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques);
    __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
    ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques = ((PyObject*)__pyx_v_uniques);

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":944
 *         else:
 *             self.uniques = uniques
 *             self.count = len(uniques)             # <<<<<<<<<<<<<<
 * 
 *     def get_count(self):
 */
    __pyx_t_2 = __pyx_v_uniques;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count = __pyx_t_3;
  }
  __pyx_L7:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":946
 *             self.count = len(uniques)
 * 
 *     def get_count(self):             # <<<<<<<<<<<<<<
 *         return self.count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_1get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_1get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_count");

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":947
 * 
 *     def get_count(self):
 *         return self.count             # <<<<<<<<<<<<<<
 * 
 *     def get_labels(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 947; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":949
 *         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_2get_labels(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_2get_labels(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels;
  PyArrayObject *__pyx_v_counts;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  PyObject *__pyx_v_val;
  Py_buffer __pyx_bstruct_labels;
  Py_ssize_t __pyx_bstride_0_labels = 0;
  Py_ssize_t __pyx_bshape_0_labels = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  Py_ssize_t __pyx_t_20;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_labels.buf = NULL;
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":951
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":954
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = self.count             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":955
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = self.count
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 * 
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":958
 *             object val
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         counts = np.empty(count + 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 = 958; __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 = 958; __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 = 958; __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 = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 958; __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 = 958; __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 = 958; __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[11]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 958; __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 = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_labels, (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_bstruct_labels, (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_bstride_0_labels = __pyx_bstruct_labels.strides[0];
    __pyx_bshape_0_labels = __pyx_bstruct_labels.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_labels));
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":959
 * 
 *         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 = 959; __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 = 959; __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 + __pyx_v_n)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 959; __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 = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 959; __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 = 959; __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 = 959; __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 = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 959; __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_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 = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":961
 *         counts = np.empty(count + n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":962
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_values)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_14, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":964
 *             val = values[i]
 * 
 *             if val in self.table:             # <<<<<<<<<<<<<<
 *                 idx = self.table[val]
 *                 labels[i] = idx
 */
    if (unlikely(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_15 = ((PyDict_Contains(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_v_val))); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_15) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":965
 * 
 *             if val in self.table:
 *                 idx = self.table[val]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 965; __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 = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_idx = __pyx_t_16;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":966
 *             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_bshape_0_labels;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_16, __pyx_bstride_0_labels) = __pyx_v_idx;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":967
 *                 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_bshape_0_counts;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 967; __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_bshape_0_counts;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_18, __pyx_bstride_0_counts) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_17, __pyx_bstride_0_counts)) + 1);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":969
 *                 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 = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_v_val, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":970
 *             else:
 *                 self.table[val] = count
 *                 self.uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_8 = PyList_Append(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques, __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":971
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_bshape_0_labels;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_bshape_0_labels)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_labels.buf, __pyx_t_19, __pyx_bstride_0_labels) = __pyx_v_count;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":972
 *                 self.uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_20 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_bshape_0_counts;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_counts)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_20, __pyx_bstride_0_counts) = 1;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":973
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":975
 *                 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 = 975; __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 = 975; __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 = 975; __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 = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_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_bstruct_labels);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.get_labels");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_labels);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_labels);
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":977
 *         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_3factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_3factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_sort = 0;
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_counts;
  PyObject *__pyx_v_sorter;
  PyObject *__pyx_v_reverse_indexer;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  PyObject *__pyx_t_7 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,0};
  __Pyx_RefNannySetupContext("factorize");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_92;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_args), "factorize") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_sort = values[1];
  } else {
    __pyx_v_sort = __pyx_k_92;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_sort = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 977; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.factorize");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_labels = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_counts = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_sorter = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_reverse_indexer = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":978
 * 
 *     def factorize(self, ndarray[object] values, sort=False):
 *         labels, counts = self.get_labels(values)             # <<<<<<<<<<<<<<
 * 
 *         # sort on
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 978; __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 = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 978; __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 (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
    PyObject* tuple = __pyx_t_3;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_4, 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_t_1 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_EndUnpack(__pyx_t_4, 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":981
 * 
 *         # sort on
 *         if sort:             # <<<<<<<<<<<<<<
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":982
 *         # 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_80); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 982; __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 = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
    __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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 = 982; __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 = 982; __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 = 982; __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_sorter);
    __pyx_v_sorter = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":983
 *         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 = 983; __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 = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 983; __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 = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 983; __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 = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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_DECREF(__pyx_v_reverse_indexer);
    __pyx_v_reverse_indexer = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":984
 *             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_7 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 984; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 984; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 984; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":986
 *             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 = 986; __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 = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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_7;
    __pyx_t_7 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":987
 * 
 *             labels = reverse_indexer.take(labels)
 *             counts = counts.take(sorter)             # <<<<<<<<<<<<<<
 * 
 *         self.count = len(counts)
 */
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_counts, __pyx_n_s__take); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_L6;
  }
  __pyx_L6:;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":989
 *             counts = counts.take(sorter)
 * 
 *         self.count = len(counts)             # <<<<<<<<<<<<<<
 *         return labels, counts
 * 
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_counts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count = __pyx_t_6;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":990
 * 
 *         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 = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.factorize");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_labels);
  __Pyx_DECREF(__pyx_v_counts);
  __Pyx_DECREF(__pyx_v_sorter);
  __Pyx_DECREF(__pyx_v_reverse_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":992
 *         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_4unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_4unique(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("unique");
  __pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":994
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":995
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = self.count             # <<<<<<<<<<<<<<
 *             object val
 * 
 */
  __pyx_v_count = ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":998
 *             object val
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if val not in self.table:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":999
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1000
 *         for i in range(n):
 *             val = values[i]
 *             if val not in self.table:             # <<<<<<<<<<<<<<
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 */
    if (unlikely(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_6 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_v_val))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_6) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1001
 *             val = values[i]
 *             if val not in self.table:
 *                 self.table[val] = count             # <<<<<<<<<<<<<<
 *                 self.uniques.append(val)
 *                 count += 1
 */
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_v_val, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1002
 *             if val not in self.table:
 *                 self.table[val] = count
 *                 self.uniques.append(val)             # <<<<<<<<<<<<<<
 *                 count += 1
 *         return self.uniques
 */
      if (unlikely(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_5 = PyList_Append(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques, __pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1003
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 *                 count += 1             # <<<<<<<<<<<<<<
 *         return self.uniques
 * 
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1004
 *                 self.uniques.append(val)
 *                 count += 1
 *         return self.uniques             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.unique");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_DECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1007
 * 
 * 
 *     def unique_int64(self, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5unique_int64(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5unique_int64(PyObject *__pyx_v_self, PyObject *__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;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("unique_int64");
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (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 = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1009
 *     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 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1010
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = self.count             # <<<<<<<<<<<<<<
 *             int64_t val
 * 
 */
  __pyx_v_count = ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1013
 *             int64_t val
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if val not in self.table:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1014
 * 
 *         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_bshape_0_values;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_values)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_values.buf, __pyx_t_4, __pyx_bstride_0_values));

    /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1015
 *         for i in range(n):
 *             val = values[i]
 *             if val not in self.table:             # <<<<<<<<<<<<<<
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 */
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_6 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_t_1))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1016
 *             val = values[i]
 *             if val not in self.table:
 *                 self.table[val] = count             # <<<<<<<<<<<<<<
 *                 self.uniques.append(val)
 *                 count += 1
 */
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); 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);
      if (__Pyx_SetItemInt(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table), __pyx_v_val, __pyx_t_1, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1017
 *             if val not in self.table:
 *                 self.table[val] = count
 *                 self.uniques.append(val)             # <<<<<<<<<<<<<<
 *                 count += 1
 *         return self.uniques
 */
      if (unlikely(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques == Py_None)) {
        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyList_Append(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1018
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 *                 count += 1             # <<<<<<<<<<<<<<
 *         return self.uniques
 * 
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1019
 *                 self.uniques.append(val)
 *                 count += 1
 *         return self.uniques             # <<<<<<<<<<<<<<
 * 
 * def lookup2(ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.unique_int64");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":929
 * 
 *     cdef public:
 *         dict table             # <<<<<<<<<<<<<<
 *         list uniques
 *         Py_ssize_t count
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5table___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5table___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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 = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table));
  ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->table = ((PyObject*)Py_None);

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":930
 *     cdef public:
 *         dict table
 *         list uniques             # <<<<<<<<<<<<<<
 *         Py_ssize_t count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
  __pyx_r = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __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 = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__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_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_2__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_2__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques));
  ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->uniques = ((PyObject*)Py_None);

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

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":931
 *         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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5count___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count); 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_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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  __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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self)->count = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.count.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1021
 *         return self.uniques
 * 
 * def lookup2(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_169lookup2(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_169lookup2 = {__Pyx_NAMESTR("lookup2"), (PyCFunction)__pyx_pf_6pandas_8_tseries_169lookup2, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_169lookup2(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  PyArrayObject *__pyx_v_locs = 0;
  Py_buffer __pyx_bstruct_locs;
  Py_ssize_t __pyx_bstride_0_locs = 0;
  Py_ssize_t __pyx_bshape_0_locs = 0;
  Py_buffer __pyx_bstruct_values;
  Py_ssize_t __pyx_bstride_0_values = 0;
  Py_ssize_t __pyx_bshape_0_values = 0;
  PyObject *__pyx_r = NULL;
  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;
  __Pyx_RefNannySetupContext("lookup2");
  __pyx_self = __pyx_self;
  __pyx_bstruct_locs.buf = NULL;
  __pyx_bstruct_values.buf = NULL;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
  __pyx_bshape_0_values = __pyx_bstruct_values.shape[0];

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1023
 * def lookup2(ndarray[object] values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         int ret = 0
 *         object val
 */
  __pyx_t_1 = __pyx_v_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1024
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         object val
 *         khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1028
 *         khiter_t k
 *         long hval
 *         ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     # 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[11]; __pyx_lineno = 1028; __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 = 1028; __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 = 1028; __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 = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 1028; __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[11]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1028; __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[11]; __pyx_lineno = 1028; __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_bstruct_locs, (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_bstruct_locs.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_bstride_0_locs = __pyx_bstruct_locs.strides[0];
      __pyx_bshape_0_locs = __pyx_bstruct_locs.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1035
 *         # 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_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_bstruct_locs);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.lookup2");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_locs);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_170inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_170inner_join = {__Pyx_NAMESTR("inner_join"), (PyCFunction)__pyx_pf_6pandas_8_tseries_170inner_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_170inner_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;
  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;
  PyArrayObject *__pyx_v_right_count;
  PyArrayObject *__pyx_v_left_sorter;
  PyArrayObject *__pyx_v_right_sorter;
  PyArrayObject *__pyx_v_left_indexer;
  PyArrayObject *__pyx_v_right_indexer;
  __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;
  Py_buffer __pyx_bstruct_left_count;
  Py_ssize_t __pyx_bstride_0_left_count = 0;
  Py_ssize_t __pyx_bshape_0_left_count = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_right_indexer;
  Py_ssize_t __pyx_bstride_0_right_indexer = 0;
  Py_ssize_t __pyx_bshape_0_right_indexer = 0;
  Py_buffer __pyx_bstruct_right_sorter;
  Py_ssize_t __pyx_bstride_0_right_sorter = 0;
  Py_ssize_t __pyx_bshape_0_right_sorter = 0;
  Py_buffer __pyx_bstruct_right_count;
  Py_ssize_t __pyx_bstride_0_right_count = 0;
  Py_ssize_t __pyx_bshape_0_right_count = 0;
  Py_buffer __pyx_bstruct_left_sorter;
  Py_ssize_t __pyx_bstride_0_left_sorter = 0;
  Py_ssize_t __pyx_bshape_0_left_sorter = 0;
  Py_buffer __pyx_bstruct_left_indexer;
  Py_ssize_t __pyx_bstride_0_left_indexer = 0;
  Py_ssize_t __pyx_bshape_0_left_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  __pyx_t_5numpy_int32_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  __pyx_t_5numpy_int32_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,0};
  __Pyx_RefNannySetupContext("inner_join");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_left_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_left_sorter = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_sorter = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_left_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_left_count.buf = NULL;
  __pyx_bstruct_right_count.buf = NULL;
  __pyx_bstruct_left_sorter.buf = NULL;
  __pyx_bstruct_right_sorter.buf = NULL;
  __pyx_bstruct_left_indexer.buf = NULL;
  __pyx_bstruct_right_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
    PyObject* tuple = __pyx_t_2;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_sorter, (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_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_bstride_0_left_sorter = __pyx_bstruct_left_sorter.strides[0];
      __pyx_bshape_0_left_sorter = __pyx_bstruct_left_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_sorter));
    __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_count, (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_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_bstride_0_left_count = __pyx_bstruct_left_count.strides[0];
      __pyx_bshape_0_left_count = __pyx_bstruct_left_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_count));
    __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  } else {
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); 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);
    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;}
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_9, 1); 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);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_sorter, (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_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_bstride_0_left_sorter = __pyx_bstruct_left_sorter.strides[0];
      __pyx_bshape_0_left_sorter = __pyx_bstruct_left_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_sorter));
    __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_count, (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_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_bstride_0_left_count = __pyx_bstruct_left_count.strides[0];
      __pyx_bshape_0_left_count = __pyx_bstruct_left_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_count));
    __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "/Users/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(((PyObject *)__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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_sorter, (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_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_bstride_0_right_sorter = __pyx_bstruct_right_sorter.strides[0];
      __pyx_bshape_0_right_sorter = __pyx_bstruct_right_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_sorter));
    __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_count, (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_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_bstride_0_right_count = __pyx_bstruct_right_count.strides[0];
      __pyx_bshape_0_right_count = __pyx_bstruct_right_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_count));
    __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  } else {
    __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); 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);
    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;}
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_9, 1); 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);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_sorter, (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_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_bstride_0_right_sorter = __pyx_bstruct_right_sorter.strides[0];
      __pyx_bshape_0_right_sorter = __pyx_bstruct_right_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_sorter));
    __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_count, (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_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_bstride_0_right_count = __pyx_bstruct_right_count.strides[0];
      __pyx_bshape_0_right_count = __pyx_bstruct_right_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_count));
    __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "/Users/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_10 = (__pyx_v_max_groups + 1);
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/Users/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_12 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_bshape_0_left_count;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_left_count.buf, __pyx_t_12, __pyx_bstride_0_left_count));

    /* "/Users/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_13 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_bshape_0_right_count;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_right_count.buf, __pyx_t_13, __pyx_bstride_0_right_count));

    /* "/Users/wesm/code/pandas/pandas/src/join.pyx":21
 *         rc = right_count[i]
 * 
 *         if rc > 0 and lc > 0:             # <<<<<<<<<<<<<<
 *             count += lc * rc
 * 
 */
    __pyx_t_14 = (__pyx_v_rc > 0);
    if (__pyx_t_14) {
      __pyx_t_15 = (__pyx_v_lc > 0);
      __pyx_t_16 = __pyx_t_15;
    } else {
      __pyx_t_16 = __pyx_t_14;
    }
    if (__pyx_t_16) {

      /* "/Users/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_L8;
    }
    __pyx_L8:;
  }

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/join.pyx":30
 * 
 *     # exclude the NA group
 *     left_pos = left_count[0]             # <<<<<<<<<<<<<<
 *     right_pos = right_count[0]
 * 
 */
  __pyx_t_17 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_bshape_0_left_count;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__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_bstruct_left_count.buf, __pyx_t_17, __pyx_bstride_0_left_count));

  /* "/Users/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_18 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_bshape_0_right_count;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__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_bstruct_right_count.buf, __pyx_t_18, __pyx_bstride_0_right_count));

  /* "/Users/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(((PyObject *)__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_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_19 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_left_indexer, (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_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_bstride_0_left_indexer = __pyx_bstruct_left_indexer.strides[0];
    __pyx_bshape_0_left_indexer = __pyx_bstruct_left_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __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_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 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[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_9)); 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_9)); __pyx_t_9 = 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_19 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_right_indexer, (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_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_bstride_0_right_indexer = __pyx_bstruct_right_indexer.strides[0];
    __pyx_bshape_0_right_indexer = __pyx_bstruct_right_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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_10 = (__pyx_v_max_groups + 1);
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/Users/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_20 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_bshape_0_left_count;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_left_count.buf, __pyx_t_20, __pyx_bstride_0_left_count));

    /* "/Users/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_21 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_bshape_0_right_count;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_right_count.buf, __pyx_t_21, __pyx_bstride_0_right_count));

    /* "/Users/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_16 = (__pyx_v_rc > 0);
    if (__pyx_t_16) {
      __pyx_t_14 = (__pyx_v_lc > 0);
      __pyx_t_15 = __pyx_t_14;
    } else {
      __pyx_t_15 = __pyx_t_16;
    }
    if (__pyx_t_15) {

      /* "/Users/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_22 = __pyx_v_lc;
      for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_j = __pyx_t_23;

        /* "/Users/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));

        /* "/Users/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_24 = __pyx_v_rc;
        for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) {
          __pyx_v_k = __pyx_t_25;

          /* "/Users/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_26 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_5 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_bshape_0_left_indexer;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_bshape_0_left_indexer)) __pyx_t_5 = 0;
          if (unlikely(__pyx_t_5 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_5);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left_indexer.buf, __pyx_t_26, __pyx_bstride_0_left_indexer) = (__pyx_v_left_pos + __pyx_v_j);

          /* "/Users/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_27 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_5 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_bshape_0_right_indexer;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_bshape_0_right_indexer)) __pyx_t_5 = 0;
          if (unlikely(__pyx_t_5 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_5);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_indexer.buf, __pyx_t_27, __pyx_bstride_0_right_indexer) = (__pyx_v_right_pos + __pyx_v_k);
        }
      }

      /* "/Users/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_L11;
    }
    __pyx_L11:;

    /* "/Users/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);

    /* "/Users/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);
  }

  /* "/Users/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_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
  PyTuple_SET_ITEM(__pyx_t_9, 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_9, 1, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 0;

  /* "/Users/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_9 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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(((PyObject *)__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_9, ((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_9); __pyx_t_9 = 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(((PyObject *)__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_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_left_count);
  __Pyx_DECREF((PyObject *)__pyx_v_right_count);
  __Pyx_DECREF((PyObject *)__pyx_v_left_sorter);
  __Pyx_DECREF((PyObject *)__pyx_v_right_sorter);
  __Pyx_DECREF((PyObject *)__pyx_v_left_indexer);
  __Pyx_DECREF((PyObject *)__pyx_v_right_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_171left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_171left_outer_join = {__Pyx_NAMESTR("left_outer_join"), (PyCFunction)__pyx_pf_6pandas_8_tseries_171left_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_171left_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;
  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;
  PyArrayObject *__pyx_v_right_count;
  PyArrayObject *__pyx_v_left_sorter;
  PyArrayObject *__pyx_v_right_sorter;
  PyArrayObject *__pyx_v_left_indexer;
  PyArrayObject *__pyx_v_right_indexer;
  __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;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_right_indexer;
  Py_ssize_t __pyx_bstride_0_right_indexer = 0;
  Py_ssize_t __pyx_bshape_0_right_indexer = 0;
  Py_buffer __pyx_bstruct_right_count;
  Py_ssize_t __pyx_bstride_0_right_count = 0;
  Py_ssize_t __pyx_bshape_0_right_count = 0;
  Py_buffer __pyx_bstruct_left_count;
  Py_ssize_t __pyx_bstride_0_left_count = 0;
  Py_ssize_t __pyx_bshape_0_left_count = 0;
  Py_buffer __pyx_bstruct_right_sorter;
  Py_ssize_t __pyx_bstride_0_right_sorter = 0;
  Py_ssize_t __pyx_bshape_0_right_sorter = 0;
  Py_buffer __pyx_bstruct_left_indexer;
  Py_ssize_t __pyx_bstride_0_left_indexer = 0;
  Py_ssize_t __pyx_bshape_0_left_indexer = 0;
  Py_buffer __pyx_bstruct_left_sorter;
  Py_ssize_t __pyx_bstride_0_left_sorter = 0;
  Py_ssize_t __pyx_bshape_0_left_sorter = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  __pyx_t_5numpy_int32_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  __pyx_t_5numpy_int32_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  int __pyx_t_30;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,&__pyx_n_s__sort,0};
  __Pyx_RefNannySetupContext("left_outer_join");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[3] = __pyx_k_93;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_sort = __pyx_k_93;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_sort = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
      __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_left_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_left_sorter = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_sorter = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_left_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_rev = Py_None; __Pyx_INCREF(Py_None);
  __pyx_bstruct_left_count.buf = NULL;
  __pyx_bstruct_right_count.buf = NULL;
  __pyx_bstruct_left_sorter.buf = NULL;
  __pyx_bstruct_right_sorter.buf = NULL;
  __pyx_bstruct_left_indexer.buf = NULL;
  __pyx_bstruct_right_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
    PyObject* tuple = __pyx_t_2;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_sorter, (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_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_bstride_0_left_sorter = __pyx_bstruct_left_sorter.strides[0];
      __pyx_bshape_0_left_sorter = __pyx_bstruct_left_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_sorter));
    __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_count, (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_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_bstride_0_left_count = __pyx_bstruct_left_count.strides[0];
      __pyx_bshape_0_left_count = __pyx_bstruct_left_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_count));
    __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  } else {
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); 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);
    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;}
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_9, 1); 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);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_sorter, (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_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_bstride_0_left_sorter = __pyx_bstruct_left_sorter.strides[0];
      __pyx_bshape_0_left_sorter = __pyx_bstruct_left_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_sorter));
    __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_count, (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_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_bstride_0_left_count = __pyx_bstruct_left_count.strides[0];
      __pyx_bshape_0_left_count = __pyx_bstruct_left_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_count));
    __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "/Users/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(((PyObject *)__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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_sorter, (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_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_bstride_0_right_sorter = __pyx_bstruct_right_sorter.strides[0];
      __pyx_bshape_0_right_sorter = __pyx_bstruct_right_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_sorter));
    __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_count, (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_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_bstride_0_right_count = __pyx_bstruct_right_count.strides[0];
      __pyx_bshape_0_right_count = __pyx_bstruct_right_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_count));
    __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  } else {
    __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); 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);
    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;}
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_9, 1); 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);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_sorter, (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_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_bstride_0_right_sorter = __pyx_bstruct_right_sorter.strides[0];
      __pyx_bshape_0_right_sorter = __pyx_bstruct_right_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_sorter));
    __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_count, (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_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_bstride_0_right_count = __pyx_bstruct_right_count.strides[0];
      __pyx_bshape_0_right_count = __pyx_bstruct_right_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_count));
    __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "/Users/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_10 = (__pyx_v_max_groups + 1);
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/Users/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_12 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_bshape_0_right_count;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_count.buf, __pyx_t_12, __pyx_bstride_0_right_count)) > 0);
    if (__pyx_t_13) {

      /* "/Users/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_14 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_bshape_0_left_count;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_bshape_0_right_count;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__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_bstruct_left_count.buf, __pyx_t_14, __pyx_bstride_0_left_count)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_count.buf, __pyx_t_15, __pyx_bstride_0_right_count))));
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/Users/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_16 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_bshape_0_left_count;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__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_bstruct_left_count.buf, __pyx_t_16, __pyx_bstride_0_left_count)));
    }
    __pyx_L8:;
  }

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/join.pyx":79
 * 
 *     # exclude the NA group
 *     left_pos = left_count[0]             # <<<<<<<<<<<<<<
 *     right_pos = right_count[0]
 * 
 */
  __pyx_t_17 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_bshape_0_left_count;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__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_bstruct_left_count.buf, __pyx_t_17, __pyx_bstride_0_left_count));

  /* "/Users/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_18 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_bshape_0_right_count;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__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_bstruct_right_count.buf, __pyx_t_18, __pyx_bstride_0_right_count));

  /* "/Users/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(((PyObject *)__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_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_19 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_left_indexer, (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_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_bstride_0_left_indexer = __pyx_bstruct_left_indexer.strides[0];
    __pyx_bshape_0_left_indexer = __pyx_bstruct_left_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __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_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 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[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_9)); 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_9)); __pyx_t_9 = 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_19 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_right_indexer, (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_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_bstride_0_right_indexer = __pyx_bstruct_right_indexer.strides[0];
    __pyx_bshape_0_right_indexer = __pyx_bstruct_right_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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_10 = (__pyx_v_max_groups + 1);
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/Users/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_20 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_bshape_0_left_count;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_left_count.buf, __pyx_t_20, __pyx_bstride_0_left_count));

    /* "/Users/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_21 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_bshape_0_right_count;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_right_count.buf, __pyx_t_21, __pyx_bstride_0_right_count));

    /* "/Users/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_13 = (__pyx_v_rc == 0);
    if (__pyx_t_13) {

      /* "/Users/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_22 = __pyx_v_lc;
      for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_j = __pyx_t_23;

        /* "/Users/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_24 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_5 = -1;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_bshape_0_left_indexer;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_24 >= __pyx_bshape_0_left_indexer)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left_indexer.buf, __pyx_t_24, __pyx_bstride_0_left_indexer) = (__pyx_v_left_pos + __pyx_v_j);

        /* "/Users/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_25 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_5 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_bshape_0_right_indexer;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_bshape_0_right_indexer)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_indexer.buf, __pyx_t_25, __pyx_bstride_0_right_indexer) = -1;
      }

      /* "/Users/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_L11;
    }
    /*else*/ {

      /* "/Users/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_22 = __pyx_v_lc;
      for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_j = __pyx_t_23;

        /* "/Users/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));

        /* "/Users/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_26 = __pyx_v_rc;
        for (__pyx_t_27 = 0; __pyx_t_27 < __pyx_t_26; __pyx_t_27+=1) {
          __pyx_v_k = __pyx_t_27;

          /* "/Users/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_28 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_5 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_bshape_0_left_indexer;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_bshape_0_left_indexer)) __pyx_t_5 = 0;
          if (unlikely(__pyx_t_5 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_5);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left_indexer.buf, __pyx_t_28, __pyx_bstride_0_left_indexer) = (__pyx_v_left_pos + __pyx_v_j);

          /* "/Users/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_29 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_5 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_bshape_0_right_indexer;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_5 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_bshape_0_right_indexer)) __pyx_t_5 = 0;
          if (unlikely(__pyx_t_5 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_5);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_indexer.buf, __pyx_t_29, __pyx_bstride_0_right_indexer) = (__pyx_v_right_pos + __pyx_v_k);
        }
      }

      /* "/Users/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_L11:;

    /* "/Users/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);

    /* "/Users/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);
  }

  /* "/Users/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_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
  PyTuple_SET_ITEM(__pyx_t_9, 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_9, 1, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), 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_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[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_19 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_left_indexer, (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_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_bstride_0_left_indexer = __pyx_bstruct_left_indexer.strides[0];
    __pyx_bshape_0_left_indexer = __pyx_bstruct_left_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/Users/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_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter));
  PyTuple_SET_ITEM(__pyx_t_9, 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_9, 1, ((PyObject *)__pyx_v_right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 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_19 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_right_indexer, (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_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_bstride_0_right_indexer = __pyx_bstruct_right_indexer.strides[0];
    __pyx_bshape_0_right_indexer = __pyx_bstruct_right_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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_13 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_30 = (!__pyx_t_13);
  if (__pyx_t_30) {

    /* "/Users/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_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = ((PyObject *)__pyx_v_left);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); 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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__pyx_t_9, ((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_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_rev);
    __pyx_v_rev = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Users/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_2 = ((PyObject *)__pyx_v_left);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); 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_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_left_sorter));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter));
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/Users/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_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __Pyx_INCREF(__pyx_v_rev);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_rev);
    __Pyx_GIVEREF(__pyx_v_rev);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 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_19 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_right_indexer, (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_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_bstride_0_right_indexer = __pyx_bstruct_right_indexer.strides[0];
      __pyx_bshape_0_right_indexer = __pyx_bstruct_right_indexer.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
    __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/Users/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_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __Pyx_INCREF(__pyx_v_rev);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_rev);
    __Pyx_GIVEREF(__pyx_v_rev);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 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_19 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_left_indexer, (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_7); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
        }
      }
      __pyx_bstride_0_left_indexer = __pyx_bstruct_left_indexer.strides[0];
      __pyx_bshape_0_left_indexer = __pyx_bstruct_left_indexer.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
    __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L18;
  }
  __pyx_L18:;

  /* "/Users/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(((PyObject *)__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_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_outer_join");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_left_count);
  __Pyx_DECREF((PyObject *)__pyx_v_right_count);
  __Pyx_DECREF((PyObject *)__pyx_v_left_sorter);
  __Pyx_DECREF((PyObject *)__pyx_v_right_sorter);
  __Pyx_DECREF((PyObject *)__pyx_v_left_indexer);
  __Pyx_DECREF((PyObject *)__pyx_v_right_indexer);
  __Pyx_DECREF(__pyx_v_rev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_172full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_172full_outer_join = {__Pyx_NAMESTR("full_outer_join"), (PyCFunction)__pyx_pf_6pandas_8_tseries_172full_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_172full_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;
  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;
  PyArrayObject *__pyx_v_right_count;
  PyArrayObject *__pyx_v_left_sorter;
  PyArrayObject *__pyx_v_right_sorter;
  PyArrayObject *__pyx_v_left_indexer;
  PyArrayObject *__pyx_v_right_indexer;
  __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;
  Py_buffer __pyx_bstruct_left_count;
  Py_ssize_t __pyx_bstride_0_left_count = 0;
  Py_ssize_t __pyx_bshape_0_left_count = 0;
  Py_buffer __pyx_bstruct_right;
  Py_ssize_t __pyx_bstride_0_right = 0;
  Py_ssize_t __pyx_bshape_0_right = 0;
  Py_buffer __pyx_bstruct_right_indexer;
  Py_ssize_t __pyx_bstride_0_right_indexer = 0;
  Py_ssize_t __pyx_bshape_0_right_indexer = 0;
  Py_buffer __pyx_bstruct_right_sorter;
  Py_ssize_t __pyx_bstride_0_right_sorter = 0;
  Py_ssize_t __pyx_bshape_0_right_sorter = 0;
  Py_buffer __pyx_bstruct_right_count;
  Py_ssize_t __pyx_bstride_0_right_count = 0;
  Py_ssize_t __pyx_bshape_0_right_count = 0;
  Py_buffer __pyx_bstruct_left_sorter;
  Py_ssize_t __pyx_bstride_0_left_sorter = 0;
  Py_ssize_t __pyx_bshape_0_left_sorter = 0;
  Py_buffer __pyx_bstruct_left_indexer;
  Py_ssize_t __pyx_bstride_0_left_indexer = 0;
  Py_ssize_t __pyx_bshape_0_left_indexer = 0;
  Py_buffer __pyx_bstruct_left;
  Py_ssize_t __pyx_bstride_0_left = 0;
  Py_ssize_t __pyx_bshape_0_left = 0;
  PyObject *__pyx_r = NULL;
  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;
  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_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  __pyx_t_5numpy_int32_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;
  __pyx_t_5numpy_int32_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,0};
  __Pyx_RefNannySetupContext("full_outer_join");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_left = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_right = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
    __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_left_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_left_sorter = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_sorter = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_left_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_right_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_left_count.buf = NULL;
  __pyx_bstruct_right_count.buf = NULL;
  __pyx_bstruct_left_sorter.buf = NULL;
  __pyx_bstruct_right_sorter.buf = NULL;
  __pyx_bstruct_left_indexer.buf = NULL;
  __pyx_bstruct_right_indexer.buf = NULL;
  __pyx_bstruct_left.buf = NULL;
  __pyx_bstruct_right.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left, (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_bstride_0_left = __pyx_bstruct_left.strides[0];
  __pyx_bshape_0_left = __pyx_bstruct_left.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right, (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_bstride_0_right = __pyx_bstruct_right.strides[0];
  __pyx_bshape_0_right = __pyx_bstruct_right.shape[0];

  /* "/Users/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;

  /* "/Users/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(((PyObject *)__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 (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
    PyObject* tuple = __pyx_t_2;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
    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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_sorter, (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_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_bstride_0_left_sorter = __pyx_bstruct_left_sorter.strides[0];
      __pyx_bshape_0_left_sorter = __pyx_bstruct_left_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_sorter));
    __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_count, (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_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_bstride_0_left_count = __pyx_bstruct_left_count.strides[0];
      __pyx_bshape_0_left_count = __pyx_bstruct_left_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_count));
    __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  } else {
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); 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);
    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;}
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_9, 1); 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);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_sorter, (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_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_bstride_0_left_sorter = __pyx_bstruct_left_sorter.strides[0];
      __pyx_bshape_0_left_sorter = __pyx_bstruct_left_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_sorter));
    __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_left_count, (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_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_bstride_0_left_count = __pyx_bstruct_left_count.strides[0];
      __pyx_bshape_0_left_count = __pyx_bstruct_left_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_count));
    __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "/Users/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(((PyObject *)__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 (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_sorter, (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_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_bstride_0_right_sorter = __pyx_bstruct_right_sorter.strides[0];
      __pyx_bshape_0_right_sorter = __pyx_bstruct_right_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_sorter));
    __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_count, (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_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_bstride_0_right_count = __pyx_bstruct_right_count.strides[0];
      __pyx_bshape_0_right_count = __pyx_bstruct_right_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_count));
    __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  } else {
    __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); 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);
    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;}
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_9, 1); 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);
    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;}
    if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_sorter, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_sorter, (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_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_bstride_0_right_sorter = __pyx_bstruct_right_sorter.strides[0];
      __pyx_bshape_0_right_sorter = __pyx_bstruct_right_sorter.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_sorter));
    __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_count, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_bstruct_right_count, (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_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_bstride_0_right_count = __pyx_bstruct_right_count.strides[0];
      __pyx_bshape_0_right_count = __pyx_bstruct_right_count.shape[0];
      if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_count));
    __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "/Users/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_10 = (__pyx_v_max_groups + 1);
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/Users/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_12 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_bshape_0_left_count;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_left_count.buf, __pyx_t_12, __pyx_bstride_0_left_count));

    /* "/Users/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_13 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_bshape_0_right_count;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_right_count.buf, __pyx_t_13, __pyx_bstride_0_right_count));

    /* "/Users/wesm/code/pandas/pandas/src/join.pyx":135
 *         rc = right_count[i]
 * 
 *         if rc > 0 and lc > 0:             # <<<<<<<<<<<<<<
 *             count += lc * rc
 *         else:
 */
    __pyx_t_14 = (__pyx_v_rc > 0);
    if (__pyx_t_14) {
      __pyx_t_15 = (__pyx_v_lc > 0);
      __pyx_t_16 = __pyx_t_15;
    } else {
      __pyx_t_16 = __pyx_t_14;
    }
    if (__pyx_t_16) {

      /* "/Users/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_L8;
    }
    /*else*/ {

      /* "/Users/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_L8:;
  }

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/join.pyx":146
 * 
 *     # exclude the NA group
 *     left_pos = left_count[0]             # <<<<<<<<<<<<<<
 *     right_pos = right_count[0]
 * 
 */
  __pyx_t_17 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_bshape_0_left_count;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__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_bstruct_left_count.buf, __pyx_t_17, __pyx_bstride_0_left_count));

  /* "/Users/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_18 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_bshape_0_right_count;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__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_bstruct_right_count.buf, __pyx_t_18, __pyx_bstride_0_right_count));

  /* "/Users/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(((PyObject *)__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_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_19 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_left_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_left_indexer, (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_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_bstride_0_left_indexer = __pyx_bstruct_left_indexer.strides[0];
    __pyx_bshape_0_left_indexer = __pyx_bstruct_left_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/Users/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_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __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_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 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[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_9)); 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_9)); __pyx_t_9 = 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_19 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_right_indexer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 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_bstruct_right_indexer, (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_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_bstride_0_right_indexer = __pyx_bstruct_right_indexer.strides[0];
    __pyx_bshape_0_right_indexer = __pyx_bstruct_right_indexer.shape[0];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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_10 = (__pyx_v_max_groups + 1);
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/Users/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_20 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_bshape_0_left_count;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_bshape_0_left_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_left_count.buf, __pyx_t_20, __pyx_bstride_0_left_count));

    /* "/Users/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_21 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_bshape_0_right_count;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_bshape_0_right_count)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__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_bstruct_right_count.buf, __pyx_t_21, __pyx_bstride_0_right_count));

    /* "/Users/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_16 = (__pyx_v_rc == 0);
    if (__pyx_t_16) {

      /* "/Users/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_22 = __pyx_v_lc;
      for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_j = __pyx_t_23;

        /* "/Users/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_24 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_5 = -1;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_bshape_0_left_indexer;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_24 >= __pyx_bshape_0_left_indexer)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left_indexer.buf, __pyx_t_24, __pyx_bstride_0_left_indexer) = (__pyx_v_left_pos + __pyx_v_j);

        /* "/Users/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_25 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_5 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_bshape_0_right_indexer;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_bshape_0_right_indexer)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_indexer.buf, __pyx_t_25, __pyx_bstride_0_right_indexer) = -1;
      }

      /* "/Users/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_L11;
    }

    /* "/Users/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_16 = (__pyx_v_lc == 0);
    if (__pyx_t_16) {

      /* "/Users/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_22 = __pyx_v_rc;
      for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_j = __pyx_t_23;

        /* "/Users/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_26 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_5 = -1;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_bshape_0_left_indexer;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_26 >= __pyx_bshape_0_left_indexer)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left_indexer.buf, __pyx_t_26, __pyx_bstride_0_left_indexer) = -1;

        /* "/Users/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_27 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_5 = -1;
        if (__pyx_t_27 < 0) {
          __pyx_t_27 += __pyx_bshape_0_right_indexer;
          if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_27 >= __pyx_bshape_0_right_indexer)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_indexer.buf, __pyx_t_27, __pyx_bstride_0_right_indexer) = (__pyx_v_right_pos + __pyx_v_j);
      }

      /* "/Users/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_L11;
    }
    /*else*/ {

      /* "/Users/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_22 = __pyx_v_lc;
      for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_j = __pyx_t_23;

        /* "/Users/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));

        /* "/Users/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_28 = __pyx_v_rc;
        for (__pyx_t_29 = 0; __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) {
          __pyx_v_k = __pyx_t_29;

          /* "/Users/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_30 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_5 = -1;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_bshape_0_left_indexer;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_5 = 0;
          } else if (unlikely(__pyx_t_30 >= __pyx_bshape_0_left_indexer)) __pyx_t_5 = 0;
          if (unlikely(__pyx_t_5 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_5);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_left_indexer.buf, __pyx_t_30, __pyx_bstride_0_left_indexer) = (__pyx_v_left_pos + __pyx_v_j);

          /* "/Users/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_31 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_5 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_bshape_0_right_indexer;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_5 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_bshape_0_right_indexer)) __pyx_t_5 = 0;
          if (unlikely(__pyx_t_5 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_5);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_right_indexer.buf, __pyx_t_31, __pyx_bstride_0_right_indexer) = (__pyx_v_right_pos + __pyx_v_k);
        }
      }

      /* "/Users/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_L11:;

    /* "/Users/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);

    /* "/Users/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);
  }

  /* "/Users/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_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
  PyTuple_SET_ITEM(__pyx_t_9, 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_9, 1, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), 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_9)); __pyx_t_9 = 0;

  /* "/Users/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_9 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __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(((PyObject *)__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_9, ((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_9); __pyx_t_9 = 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(((PyObject *)__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_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.full_outer_join");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_count);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_sorter);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_count);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_sorter);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_indexer);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_left_count);
  __Pyx_DECREF((PyObject *)__pyx_v_right_count);
  __Pyx_DECREF((PyObject *)__pyx_v_left_sorter);
  __Pyx_DECREF((PyObject *)__pyx_v_right_sorter);
  __Pyx_DECREF((PyObject *)__pyx_v_left_indexer);
  __Pyx_DECREF((PyObject *)__pyx_v_right_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_173_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_173_get_result_indexer = {__Pyx_NAMESTR("_get_result_indexer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_173_get_result_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_173_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sorter = 0;
  PyObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_res;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sorter,&__pyx_n_s__indexer,0};
  __Pyx_RefNannySetupContext("_get_result_indexer");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_sorter = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_indexer = PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_res = Py_None; __Pyx_INCREF(Py_None);

  /* "/Users/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(((PyObject *)__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_DECREF(__pyx_v_res);
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/Users/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(((PyObject *)__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;

  /* "/Users/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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/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_174join_sorter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_174join_sorter = {__Pyx_NAMESTR("join_sorter"), (PyCFunction)__pyx_pf_6pandas_8_tseries_174join_sorter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_174join_sorter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  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;
  PyArrayObject *__pyx_v_where;
  PyArrayObject *__pyx_v_result;
  Py_buffer __pyx_bstruct_index;
  Py_ssize_t __pyx_bstride_0_index = 0;
  Py_ssize_t __pyx_bshape_0_index = 0;
  Py_buffer __pyx_bstruct_result;
  Py_ssize_t __pyx_bstride_0_result = 0;
  Py_ssize_t __pyx_bshape_0_result = 0;
  Py_buffer __pyx_bstruct_counts;
  Py_ssize_t __pyx_bstride_0_counts = 0;
  Py_ssize_t __pyx_bshape_0_counts = 0;
  Py_buffer __pyx_bstruct_where;
  Py_ssize_t __pyx_bstride_0_where = 0;
  Py_ssize_t __pyx_bshape_0_where = 0;
  PyObject *__pyx_r = NULL;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__ngroups,0};
  __Pyx_RefNannySetupContext("join_sorter");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_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, PyTuple_GET_SIZE(__pyx_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 {
    __pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(PyTuple_GET_ITEM(__pyx_args, 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_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_where = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_bstruct_counts.buf = NULL;
  __pyx_bstruct_where.buf = NULL;
  __pyx_bstruct_result.buf = NULL;
  __pyx_bstruct_index.buf = NULL;
  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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (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_bstride_0_index = __pyx_bstruct_index.strides[0];
  __pyx_bshape_0_index = __pyx_bstruct_index.shape[0];

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_counts);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_counts, (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_bstruct_counts, (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_bstride_0_counts = __pyx_bstruct_counts.strides[0];
    __pyx_bshape_0_counts = __pyx_bstruct_counts.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_DECREF(((PyObject *)__pyx_v_counts));
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Users/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_4 = ((PyObject *)__pyx_v_index);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_n = __pyx_t_10;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_index.buf, __pyx_t_11, __pyx_bstride_0_index)) + 1);
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_12, __pyx_bstride_0_counts) += 1;
  }

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_where);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_where, (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_bstruct_where, (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_bstride_0_where = __pyx_bstruct_where.strides[0];
    __pyx_bshape_0_where = __pyx_bstruct_where.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_DECREF(((PyObject *)__pyx_v_where));
  __pyx_v_where = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_where.buf, __pyx_t_15, __pyx_bstride_0_where) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_where.buf, __pyx_t_13, __pyx_bstride_0_where)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_counts.buf, __pyx_t_14, __pyx_bstride_0_counts)));
  }

  /* "/Users/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(((PyObject *)__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 = PyEval_CallObjectWithKeywords(__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_bstruct_result);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (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_bstruct_result, (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_bstride_0_result = __pyx_bstruct_result.strides[0];
    __pyx_bshape_0_result = __pyx_bstruct_result.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_DECREF(((PyObject *)__pyx_v_result));
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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++) {

    /* "/Users/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_bstruct_index.buf, __pyx_t_16, __pyx_bstride_0_index)) + 1);

    /* "/Users/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_bstruct_where.buf, __pyx_t_17, __pyx_bstride_0_where));
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_result.buf, __pyx_t_18, __pyx_bstride_0_result) = __pyx_v_i;

    /* "/Users/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_bstruct_where.buf, __pyx_t_19, __pyx_bstride_0_where) += 1;
  }

  /* "/Users/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(((PyObject *)__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_bstruct_index);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_where);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.join_sorter");
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_counts);
  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_where);
  __pyx_L2:;
  __Pyx_DECREF((PyObject *)__pyx_v_counts);
  __Pyx_DECREF((PyObject *)__pyx_v_where);
  __Pyx_DECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Users/wesm/code/pandas/pandas/src/join.pyx":212
 *     return result, counts
 * 
 * def _big_join_sorter(index):             # <<<<<<<<<<<<<<
 *     pass
 */

static PyObject *__pyx_pf_6pandas_8_tseries_175_big_join_sorter(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_175_big_join_sorter = {__Pyx_NAMESTR("_big_join_sorter"), (PyCFunction)__pyx_pf_6pandas_8_tseries_175_big_join_sorter, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_6pandas_8_tseries_175_big_join_sorter(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("_big_join_sorter");
  __pyx_self = __pyx_self;

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

/* "numpy.pxd":188
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

static CYTHON_UNUSED int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  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;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  __Pyx_RefNannySetupContext("__getbuffer__");
  if (__pyx_v_info == NULL) return 0;
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "numpy.pxd":194
 *             # of flags
 *             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":195
 *             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":197
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":199
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_2) {

    /* "numpy.pxd":200
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "numpy.pxd":202
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
    __pyx_v_copy_shape = 0;
  }
  __pyx_L5:;

  /* "numpy.pxd":204
 *                 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_2 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
  if (__pyx_t_2) {

    /* "numpy.pxd":205
 * 
 *             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_self;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_t_1), NPY_C_CONTIGUOUS));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  if (__pyx_t_4) {

    /* "numpy.pxd":206
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[13]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "numpy.pxd":208
 *                 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_4 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
  if (__pyx_t_4) {

    /* "numpy.pxd":209
 * 
 *             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 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_t_1), NPY_F_CONTIGUOUS));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  if (__pyx_t_3) {

    /* "numpy.pxd":210
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[13]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "numpy.pxd":212
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_t_1 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":213
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info. This is allocated
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "numpy.pxd":214
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info. This is allocated
 *                 # as one block, strides first.
 */
  if (__pyx_v_copy_shape) {

    /* "numpy.pxd":217
 *                 # Allocate new buffer for strides and shape info. This is allocated
 *                 # as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));

    /* "numpy.pxd":218
 *                 # as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 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":219
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_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":220
 *                 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_t_1 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_1);
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_t_1))[__pyx_v_i]);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "numpy.pxd":221
 *                 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_t_1 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_1);
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(((PyArrayObject *)__pyx_t_1))[__pyx_v_i]);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    goto __pyx_L8;
  }
  /*else*/ {

    /* "numpy.pxd":223
 *                     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_t_1 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_t_1)));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "numpy.pxd":224
 *             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_t_1 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(((PyArrayObject *)__pyx_t_1)));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L8:;

  /* "numpy.pxd":225
 *                 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":226
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_t_1 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":227
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_t_1 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_t_1)));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":230
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef list stack
 */
  __pyx_v_f = NULL;

  /* "numpy.pxd":231
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef list stack
 *             cdef int offset
 */
  __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
  __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;

  /* "numpy.pxd":235
 *             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":237
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_3 = (!__pyx_v_hasfields);
  if (__pyx_t_3) {
    __pyx_t_4 = (!__pyx_v_copy_shape);
    __pyx_t_2 = __pyx_t_4;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "numpy.pxd":239
 *             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_L11;
  }
  /*else*/ {

    /* "numpy.pxd":242
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = __pyx_v_self;
  }
  __pyx_L11:;

  /* "numpy.pxd":244
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 */
  __pyx_t_2 = (!__pyx_v_hasfields);
  if (__pyx_t_2) {

    /* "numpy.pxd":245
 * 
 *             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":246
 *             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_2 = (__pyx_v_descr->byteorder == '>');
    if (__pyx_t_2) {
      __pyx_t_3 = __pyx_v_little_endian;
    } else {
      __pyx_t_3 = __pyx_t_2;
    }
    if (!__pyx_t_3) {

      /* "numpy.pxd":247
 *                 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_2 = (__pyx_v_descr->byteorder == '<');
      if (__pyx_t_2) {
        __pyx_t_4 = (!__pyx_v_little_endian);
        __pyx_t_7 = __pyx_t_4;
      } else {
        __pyx_t_7 = __pyx_t_2;
      }
      __pyx_t_2 = __pyx_t_7;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "numpy.pxd":248
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "numpy.pxd":249
 *                     (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_2 = (__pyx_v_t == NPY_BYTE);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__b;
      goto __pyx_L14;
    }

    /* "numpy.pxd":250
 *                     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_2 = (__pyx_v_t == NPY_UBYTE);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__B;
      goto __pyx_L14;
    }

    /* "numpy.pxd":251
 *                 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_2 = (__pyx_v_t == NPY_SHORT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__h;
      goto __pyx_L14;
    }

    /* "numpy.pxd":252
 *                 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_2 = (__pyx_v_t == NPY_USHORT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__H;
      goto __pyx_L14;
    }

    /* "numpy.pxd":253
 *                 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_2 = (__pyx_v_t == NPY_INT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__i;
      goto __pyx_L14;
    }

    /* "numpy.pxd":254
 *                 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_2 = (__pyx_v_t == NPY_UINT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__I;
      goto __pyx_L14;
    }

    /* "numpy.pxd":255
 *                 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_2 = (__pyx_v_t == NPY_LONG);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__l;
      goto __pyx_L14;
    }

    /* "numpy.pxd":256
 *                 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_2 = (__pyx_v_t == NPY_ULONG);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__L;
      goto __pyx_L14;
    }

    /* "numpy.pxd":257
 *                 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_2 = (__pyx_v_t == NPY_LONGLONG);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__q;
      goto __pyx_L14;
    }

    /* "numpy.pxd":258
 *                 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_2 = (__pyx_v_t == NPY_ULONGLONG);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__Q;
      goto __pyx_L14;
    }

    /* "numpy.pxd":259
 *                 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_2 = (__pyx_v_t == NPY_FLOAT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__f;
      goto __pyx_L14;
    }

    /* "numpy.pxd":260
 *                 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_2 = (__pyx_v_t == NPY_DOUBLE);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__d;
      goto __pyx_L14;
    }

    /* "numpy.pxd":261
 *                 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_2 = (__pyx_v_t == NPY_LONGDOUBLE);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__g;
      goto __pyx_L14;
    }

    /* "numpy.pxd":262
 *                 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_2 = (__pyx_v_t == NPY_CFLOAT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__Zf;
      goto __pyx_L14;
    }

    /* "numpy.pxd":263
 *                 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_2 = (__pyx_v_t == NPY_CDOUBLE);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__Zd;
      goto __pyx_L14;
    }

    /* "numpy.pxd":264
 *                 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_2 = (__pyx_v_t == NPY_CLONGDOUBLE);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__Zg;
      goto __pyx_L14;
    }

    /* "numpy.pxd":265
 *                 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_2 = (__pyx_v_t == NPY_OBJECT);
    if (__pyx_t_2) {
      __pyx_v_f = __pyx_k__O;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "numpy.pxd":267
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_1 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_100), __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L14:;

    /* "numpy.pxd":268
 *                 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":269
 *                     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_L12;
  }
  /*else*/ {

    /* "numpy.pxd":271
 *                 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":272
 *             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":273
 *                 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":276
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)             # <<<<<<<<<<<<<<
 *                 f[0] = 0 # Terminate format string
 * 
 */
    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_9;

    /* "numpy.pxd":277
 *                                       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_L12:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__");
  __pyx_r = -1;
  __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->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;
}

/* "numpy.pxd":279
 *                 f[0] = 0 # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

static CYTHON_UNUSED void __pyx_pf_5numpy_7ndarray_1__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pf_5numpy_7ndarray_1__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__releasebuffer__");

  /* "numpy.pxd":280
 * 
 *         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 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "numpy.pxd":281
 *         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_L5;
  }
  __pyx_L5:;

  /* "numpy.pxd":282
 *             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_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_2) {

    /* "numpy.pxd":283
 *                 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_L6;
  }
  __pyx_L6:;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":756
 * 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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1");

  /* "numpy.pxd":757
 * 
 * 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 = 757; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":759
 *     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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2");

  /* "numpy.pxd":760
 * 
 * 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 = 760; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":762
 *     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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3");

  /* "numpy.pxd":763
 * 
 * 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 = 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("numpy.PyArray_MultiIterNew3");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":765
 *     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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4");

  /* "numpy.pxd":766
 * 
 * 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 = 766; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":768
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5");

  /* "numpy.pxd":769
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * 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 = 769; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":771
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # 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;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_childname;
  PyObject *__pyx_v_new_offset;
  PyObject *__pyx_v_t;
  char *__pyx_r;
  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;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  char *__pyx_t_11;
  __Pyx_RefNannySetupContext("_util_dtypestring");
  __pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_fields = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_childname = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_t = Py_None; __Pyx_INCREF(Py_None);

  /* "numpy.pxd":778
 *     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":779
 *     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":782
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(__pyx_v_descr->names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[13]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2);
  for (;;) {
    if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++;
    __Pyx_DECREF(__pyx_v_childname);
    __pyx_v_childname = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "numpy.pxd":783
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_fields));
    __pyx_v_fields = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "numpy.pxd":784
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 */
    if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) {
      PyObject* tuple = ((PyObject *)__pyx_v_fields);
      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_v_child));
      __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_new_offset);
      __pyx_v_new_offset = __pyx_t_4;
      __pyx_t_4 = 0;
    } else {
      __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "numpy.pxd":786
 *         child, new_offset = fields
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "numpy.pxd":787
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "numpy.pxd":789
 *             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":790
 * 
 *         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":791
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "numpy.pxd":801
 * 
 *         # 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 = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_6) break;

      /* "numpy.pxd":802
 *         # 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":803
 *         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":804
 *             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":806
 *             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":808
 *         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":809
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "numpy.pxd":810
 *         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":811
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[13]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "numpy.pxd":814
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 814; __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 = 814; __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 = 814; __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":815
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 815; __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 = 815; __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 = 815; __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":816
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 816; __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 = 816; __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 = 816; __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":817
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 817; __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 = 817; __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 = 817; __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":818
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 818; __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 = 818; __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 = 818; __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":819
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 819; __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 = 819; __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 = 819; __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":820
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONG); 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_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 820; __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 = 820; __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":821
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 821; __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 = 821; __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 = 821; __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":822
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); 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_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 822; __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 = 822; __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":823
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 823; __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 = 823; __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 = 823; __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":824
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 824; __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 = 824; __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 = 824; __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":825
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); 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_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); 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_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 = 825; __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":826
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); 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_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); 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_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 = 826; __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":827
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); 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_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); 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_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 = 827; __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":828
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); 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_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); 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_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 = 828; __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":829
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); 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_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); 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_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 = 829; __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":830
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); 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_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); 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_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 = 830; __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":832
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_100), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 832; __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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__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 = 832; __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);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[13]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L11:;

      /* "numpy.pxd":833
 *             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":837
 *             # 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 = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_11;
    }
    __pyx_L9:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "numpy.pxd":838
 *             # 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("numpy._util_dtypestring");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_child);
  __Pyx_DECREF(__pyx_v_fields);
  __Pyx_DECREF(__pyx_v_childname);
  __Pyx_DECREF(__pyx_v_new_offset);
  __Pyx_DECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":953
 * 
 * 
 * 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;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("set_array_base");

  /* "numpy.pxd":955
 * 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":956
 *      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":958
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
    __pyx_t_2 = __pyx_v_base;
    __Pyx_INCREF(__pyx_t_2);
    Py_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "numpy.pxd":959
 *      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":960
 *          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":961
 *          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":963
 *      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;
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base");

  /* "numpy.pxd":964
 * 
 * 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":965
 * 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":967
 *         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;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  __Pyx_RefNannySetupContext("get_value_at");
  __Pyx_INCREF(__pyx_v_loc);
  __pyx_v_casted = Py_None; __Pyx_INCREF(Py_None);

  /* "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 = __pyx_v_loc;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = is_float_object(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "util.pxd":19
 *         void* data_ptr
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_casted);
    __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 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_2) {

      /* "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 = __pyx_t_4;

  /* "util.pxd":23
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0:
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_sz = PyArray_SIZE(((PyArrayObject *)__pyx_t_3));
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "util.pxd":25
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz:
 */
  __pyx_t_2 = (__pyx_v_i < 0);
  if (__pyx_t_2) {

    /* "util.pxd":26
 * 
 *     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":27
 *     if i < 0:
 *         i += sz
 *     elif i >= sz:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_2 = (__pyx_v_i >= __pyx_v_sz);
  if (__pyx_t_2) {

    /* "util.pxd":28
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_107), 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);
    __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 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = get_value_1d(((PyArrayObject *)__pyx_t_3), __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__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_3);
  __Pyx_AddTraceback("util.get_value_at");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_casted);
  __Pyx_DECREF(__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;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("set_value_at");
  __Pyx_INCREF(__pyx_v_loc);
  __pyx_v_casted = Py_None; __Pyx_INCREF(Py_None);

  /* "util.pxd":35
 *     cdef:
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = __pyx_v_loc;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = is_float_object(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "util.pxd":36
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), 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_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_casted);
    __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 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_2) {

      /* "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 = __pyx_t_4;

  /* "util.pxd":40
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0:
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_sz = PyArray_SIZE(((PyArrayObject *)__pyx_t_3));
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "util.pxd":42
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz:
 */
  __pyx_t_2 = (__pyx_v_i < 0);
  if (__pyx_t_2) {

    /* "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_2 = (__pyx_v_i >= __pyx_v_sz);
  if (__pyx_t_2) {

    /* "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_108), 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);
    __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_3 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = assign_value_1d(((PyArrayObject *)__pyx_t_3), __pyx_v_i, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 47; __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;

  __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("util.set_value_at");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_casted);
  __Pyx_DECREF(__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;
  PyObject *__pyx_t_1 = NULL;
  __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_t_1 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = PyArray_CHKFLAGS(((PyArrayObject *)__pyx_t_1), NPY_C_CONTIGUOUS);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  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;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __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_v_o;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("util.is_array");
  __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_pf_6pandas_8_tseries_8MultiMap_1get, 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_pf_6pandas_8_tseries_8MultiMap___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_pf_6pandas_8_tseries_4Node_5value___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_4Node_value(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_4Node_5value_1__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_pf_6pandas_8_tseries_4Node_4next___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_4Node_next(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_4Node_4next_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_4Node_4next_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_4Node_width(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_4Node_5width___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_4Node_width(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_4Node_5width_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_4Node_5width_2__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_pf_6pandas_8_tseries_4Node___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_pf_6pandas_8_tseries_17IndexableSkiplist_3get, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_4insert, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_5remove, 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_pf_6pandas_8_tseries_17IndexableSkiplist_1__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_pf_6pandas_8_tseries_17IndexableSkiplist_1__len__, /*mp_length*/
  __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_2__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_pf_6pandas_8_tseries_17IndexableSkiplist___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_pf_6pandas_8_tseries_7Reducer_1_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pf_6pandas_8_tseries_7Reducer_2get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_7Reducer_3_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_pf_6pandas_8_tseries_7Reducer___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_pf_6pandas_8_tseries_13SeriesGrouper_3arr___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_arr(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_index(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_index(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_dummy(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_dummy(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_f(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_f(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_labels(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_labels(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_2__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_SeriesGrouper[] = {
  {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pf_6pandas_8_tseries_13SeriesGrouper_2get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pf_6pandas_8_tseries_13SeriesGrouper_3_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_pf_6pandas_8_tseries_13SeriesGrouper___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_pf_6pandas_8_tseries_6Slider___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_pf_6pandas_8_tseries_14cache_readonly_1__get__(o, i, c);
  return r;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14cache_readonly_fget(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_14cache_readonly_4fget___get__(o);
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14cache_readonly_name(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_14cache_readonly_4name___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_pf_6pandas_8_tseries_14cache_readonly___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_pf_6pandas_8_tseries_12AxisProperty_1__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_pf_6pandas_8_tseries_12AxisProperty_2__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_pf_6pandas_8_tseries_12AxisProperty___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_pf_6pandas_8_tseries_11SeriesIndex_1__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_pf_6pandas_8_tseries_11SeriesIndex_2__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_pf_6pandas_8_tseries_11SeriesIndex___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_pf_6pandas_8_tseries_14ValuesProperty___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_pf_6pandas_8_tseries_15StringHashTable_1__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_pf_6pandas_8_tseries_15StringHashTable_2__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_pf_6pandas_8_tseries_15StringHashTable_3get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15StringHashTable_4get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15StringHashTable_5set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15StringHashTable_6get_indexer, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15StringHashTable_7unique, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15StringHashTable_8factorize, 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_pf_6pandas_8_tseries_15StringHashTable___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_pf_6pandas_8_tseries_14Int32HashTable_1__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_pf_6pandas_8_tseries_14Int32HashTable_2__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_pf_6pandas_8_tseries_14Int32HashTable_3get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int32HashTable_4get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int32HashTable_5set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int32HashTable_6map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int32HashTable_7lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int32HashTable_8factorize, 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_pf_6pandas_8_tseries_14Int32HashTable___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_pf_6pandas_8_tseries_14Int64HashTable_1__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_pf_6pandas_8_tseries_14Int64HashTable_2__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_pf_6pandas_8_tseries_14Int64HashTable_3get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_4get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_5set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_6map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_7map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_8lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup_i4"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_9lookup_i4, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_10factorize, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_11get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels_groupby"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_12get_labels_groupby, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14Int64HashTable_13unique, 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_pf_6pandas_8_tseries_14Int64HashTable___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_pf_6pandas_8_tseries_16Float64HashTable_1__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_pf_6pandas_8_tseries_16Float64HashTable_2__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_pf_6pandas_8_tseries_16Float64HashTable_3factorize, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pf_6pandas_8_tseries_16Float64HashTable_4get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pf_6pandas_8_tseries_16Float64HashTable_5map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pf_6pandas_8_tseries_16Float64HashTable_6lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_16Float64HashTable_7unique, 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_pf_6pandas_8_tseries_16Float64HashTable___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_pf_6pandas_8_tseries_17PyObjectHashTable_1__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_pf_6pandas_8_tseries_17PyObjectHashTable_2destroy, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_3get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_4get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_5set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_6map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_7lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup2"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_8lookup2, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_9unique, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_10get_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_pf_6pandas_8_tseries_17PyObjectHashTable___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_pf_6pandas_8_tseries_10Factorizer_5table___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_10Factorizer_table(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_10Factorizer_5table_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_10Factorizer_5table_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_10Factorizer_uniques(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_10Factorizer_uniques(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_10Factorizer_count(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_10Factorizer_5count___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_10Factorizer_count(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_10Factorizer_5count_1__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_pf_6pandas_8_tseries_10Factorizer_1get_count, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pf_6pandas_8_tseries_10Factorizer_2factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_10Factorizer_3unique, 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_pf_6pandas_8_tseries_10Factorizer___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_pf_6pandas_8_tseries_15Int64Factorizer_5table___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_table(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_15Int64Factorizer_uniques(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_uniques(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_15Int64Factorizer_count(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_count(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count_1__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_pf_6pandas_8_tseries_15Int64Factorizer_1get_count, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pf_6pandas_8_tseries_15Int64Factorizer_2factorize, 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_pf_6pandas_8_tseries_15Int64Factorizer___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_pf_6pandas_8_tseries_14DictFactorizer_5table___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_14DictFactorizer_table(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14DictFactorizer_uniques(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_14DictFactorizer_uniques(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_1__set__(o, v);
  }
  else {
    return __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_2__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14DictFactorizer_count(PyObject *o, void *x) {
  return __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count___get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_14DictFactorizer_count(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count_1__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_pf_6pandas_8_tseries_14DictFactorizer_1get_count, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14DictFactorizer_2get_labels, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14DictFactorizer_3factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14DictFactorizer_4unique, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_14DictFactorizer_5unique_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_pf_6pandas_8_tseries_14DictFactorizer___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_pf_6pandas_8_tseries_map_indices_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_map_indices_list)},
  {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pf_6pandas_8_tseries_2to_datetime, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("to_timestamp"), (PyCFunction)__pyx_pf_6pandas_8_tseries_3to_timestamp, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("checknull"), (PyCFunction)__pyx_pf_6pandas_8_tseries_6checknull, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("groupby_indices_naive"), (PyCFunction)__pyx_pf_6pandas_8_tseries_26groupby_indices_naive, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_indices_float64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_68map_indices_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_68map_indices_float64)},
  {__Pyx_NAMESTR("map_indices_object"), (PyCFunction)__pyx_pf_6pandas_8_tseries_69map_indices_object, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_69map_indices_object)},
  {__Pyx_NAMESTR("map_indices_int32"), (PyCFunction)__pyx_pf_6pandas_8_tseries_70map_indices_int32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_70map_indices_int32)},
  {__Pyx_NAMESTR("map_indices_int64"), (PyCFunction)__pyx_pf_6pandas_8_tseries_71map_indices_int64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_71map_indices_int64)},
  {__Pyx_NAMESTR("map_indices_bool"), (PyCFunction)__pyx_pf_6pandas_8_tseries_72map_indices_bool, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_72map_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_kp_u_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 1, 0, 0},
  {&__pyx_kp_u_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 1, 0, 0},
  {&__pyx_kp_u_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 1, 0, 0},
  {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
  {&__pyx_n_s_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 1, 1},
  {&__pyx_n_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 1},
  {&__pyx_n_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 1},
  {&__pyx_n_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 1},
  {&__pyx_n_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 1},
  {&__pyx_n_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 1},
  {&__pyx_n_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 1},
  {&__pyx_n_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 1},
  {&__pyx_n_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 1},
  {&__pyx_n_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 1},
  {&__pyx_n_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 1},
  {&__pyx_n_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 1},
  {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1},
  {&__pyx_n_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 1},
  {&__pyx_n_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 1},
  {&__pyx_n_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 1},
  {&__pyx_n_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 1},
  {&__pyx_n_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 1},
  {&__pyx_n_s_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 1, 1},
  {&__pyx_n_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 1},
  {&__pyx_n_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 1},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_n_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 1},
  {&__pyx_n_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 1},
  {&__pyx_n_s_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 1, 1},
  {&__pyx_n_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 1},
  {&__pyx_n_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 1},
  {&__pyx_n_s_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 1, 1},
  {&__pyx_n_s_136, __pyx_k_136, sizeof(__pyx_k_136), 0, 0, 1, 1},
  {&__pyx_n_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 1},
  {&__pyx_n_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 1},
  {&__pyx_n_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 1},
  {&__pyx_n_s_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 1, 1},
  {&__pyx_n_s_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 1, 1},
  {&__pyx_n_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 1},
  {&__pyx_n_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 1},
  {&__pyx_n_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 1},
  {&__pyx_n_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 1},
  {&__pyx_n_s_146, __pyx_k_146, sizeof(__pyx_k_146), 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_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_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 1},
  {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
  {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1},
  {&__pyx_n_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 1},
  {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
  {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
  {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
  {&__pyx_n_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 1},
  {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0},
  {&__pyx_kp_u_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 1, 0, 0},
  {&__pyx_kp_u_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 1, 0, 0},
  {&__pyx_kp_u_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 1, 0, 0},
  {&__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__C, __pyx_k__C, sizeof(__pyx_k__C), 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__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__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__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___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___check_type, __pyx_k___check_type, sizeof(__pyx_k___check_type), 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___set_axis, __pyx_k___set_axis, sizeof(__pyx_k___set_axis), 0, 0, 1, 1},
  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
  {&__pyx_n_s__advance, __pyx_k__advance, sizeof(__pyx_k__advance), 0, 0, 1, 1},
  {&__pyx_n_s__aggfunc, __pyx_k__aggfunc, sizeof(__pyx_k__aggfunc), 0, 0, 1, 1},
  {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 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__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__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__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 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__base, __pyx_k__base, sizeof(__pyx_k__base), 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__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__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 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__chunksize, __pyx_k__chunksize, sizeof(__pyx_k__chunksize), 0, 0, 1, 1},
  {&__pyx_n_s__cleanup, __pyx_k__cleanup, sizeof(__pyx_k__cleanup), 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__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__depth, __pyx_k__depth, sizeof(__pyx_k__depth), 0, 0, 1, 1},
  {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 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__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__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 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__fget, __pyx_k__fget, sizeof(__pyx_k__fget), 0, 0, 1, 1},
  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
  {&__pyx_n_s__fill, __pyx_k__fill, sizeof(__pyx_k__fill), 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__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__format, __pyx_k__format, sizeof(__pyx_k__format), 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__ge, __pyx_k__ge, sizeof(__pyx_k__ge), 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_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__head, __pyx_k__head, sizeof(__pyx_k__head), 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__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__increment, __pyx_k__increment, sizeof(__pyx_k__increment), 0, 0, 1, 1},
  {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 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__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__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__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__join_sorter, __pyx_k__join_sorter, sizeof(__pyx_k__join_sorter), 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__kth_smallest, __pyx_k__kth_smallest, sizeof(__pyx_k__kth_smallest), 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__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_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__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1},
  {&__pyx_n_s__lindexer, __pyx_k__lindexer, sizeof(__pyx_k__lindexer), 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__lvalues, __pyx_k__lvalues, sizeof(__pyx_k__lvalues), 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__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_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__maxlevels, __pyx_k__maxlevels, sizeof(__pyx_k__maxlevels), 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__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__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_buckets, __pyx_k__n_buckets, sizeof(__pyx_k__n_buckets), 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__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
  {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1},
  {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 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__newIndex, __pyx_k__newIndex, sizeof(__pyx_k__newIndex), 0, 0, 1, 1},
  {&__pyx_n_s__newMap, __pyx_k__newMap, sizeof(__pyx_k__newMap), 0, 0, 1, 1},
  {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 0, 0, 1, 1},
  {&__pyx_n_s__ngroups, __pyx_k__ngroups, sizeof(__pyx_k__ngroups), 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__nresults, __pyx_k__nresults, sizeof(__pyx_k__nresults), 0, 0, 1, 1},
  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 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__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__oldIndex, __pyx_k__oldIndex, sizeof(__pyx_k__oldIndex), 0, 0, 1, 1},
  {&__pyx_n_s__oldMap, __pyx_k__oldMap, sizeof(__pyx_k__oldMap), 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__orig_data, __pyx_k__orig_data, sizeof(__pyx_k__orig_data), 0, 0, 1, 1},
  {&__pyx_n_s__orig_len, __pyx_k__orig_len, sizeof(__pyx_k__orig_len), 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__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__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
  {&__pyx_n_s__passed_dummy, __pyx_k__passed_dummy, sizeof(__pyx_k__passed_dummy), 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_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__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 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__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1},
  {&__pyx_n_s__retry, __pyx_k__retry, sizeof(__pyx_k__retry), 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__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1},
  {&__pyx_n_s__rindexer, __pyx_k__rindexer, sizeof(__pyx_k__rindexer), 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__rvalues, __pyx_k__rvalues, sizeof(__pyx_k__rvalues), 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__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__set_length, __pyx_k__set_length, sizeof(__pyx_k__set_length), 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__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1},
  {&__pyx_n_s__sorter, __pyx_k__sorter, sizeof(__pyx_k__sorter), 0, 0, 1, 1},
  {&__pyx_n_s__store, __pyx_k__store, sizeof(__pyx_k__store), 0, 0, 1, 1},
  {&__pyx_n_s__stride, __pyx_k__stride, sizeof(__pyx_k__stride), 0, 0, 1, 1},
  {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 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__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 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__time, __pyx_k__time, sizeof(__pyx_k__time), 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__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
  {&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 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__vals, __pyx_k__vals, sizeof(__pyx_k__vals), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 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__view, __pyx_k__view, sizeof(__pyx_k__view), 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__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 = 154; __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[0]; __pyx_lineno = 122; __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 = 787; __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_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(((PyObject *)__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(((PyObject *)__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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/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(((PyObject *)__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));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":31
 *     sorted_data = values.take(_as)
 * 
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_69));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":71
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')
 *     argsorted = values.argsort(1).astype('i8')             # <<<<<<<<<<<<<<
 *     values.sort(axis=1)
 * 
 */
  __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_70));
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70));
  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":110
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     nan_value = Infinity() # always greater than everything
 */
  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_72));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":132
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_73 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_73));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_73, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":188
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     nan_value = Infinity() # always greater than everything
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_74));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":198
 * 
 *     try:
 *         argsorted = values.argsort(1).astype('i8')             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         values = in_arr
 */
  __pyx_k_tuple_75 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_75));
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
  __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_76));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));

  /* "/Users/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_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_79));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_78));
  PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_kp_s_78));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_78));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));

  /* "/Users/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_81 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_81));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":528
 *     if n == 0:
 *         # kludge, for Series
 *         return np.empty(0, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_88));
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));

  /* "/Users/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_89 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_89));
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));

  /* "numpy.pxd":206
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_k_tuple_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_95));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_94));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_kp_u_94));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_94));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));

  /* "numpy.pxd":210
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_97));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_u_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));

  /* "numpy.pxd":248
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_99));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_98));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_kp_u_98));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_98));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));

  /* "numpy.pxd":787
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 */
  __pyx_k_tuple_102 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_102));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_101));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_kp_u_101));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_101));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));

  /* "numpy.pxd":791
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_103));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_98));
  PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_kp_u_98));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_98));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));

  /* "numpy.pxd":811
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_k_tuple_105 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_105));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_104));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_kp_u_104));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_104));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));

  /* "util.pxd":28
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
  __pyx_k_tuple_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_107));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_106));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));

  /* "util.pxd":45
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
  __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_108));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_106));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
  __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;
  int __pyx_t_6;
  #if CYTHON_REFNANNY
  void* __pyx_refnanny = NULL;
  __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");
  }
  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit__tseries(void)", __LINE__, __FILE__);
  #endif
  __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_binding_PyCFunctionType_USED
  if (__pyx_binding_PyCFunctionType_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 ---*/
  /*--- 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.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 = 582; __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 = 582; __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 = 582; __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 = 693; __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 = 693; __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 = 693; __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 = 860; __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 = 860; __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 = 895; __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 = 895; __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 = 926; __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 = 926; __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 = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 849; __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;}
  /*--- 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); 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 = __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(((PyObject *)__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)); 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 (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_1ismember, NULL, __pyx_n_s_85); 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(((PyObject *)__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)); 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 (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_4array_to_timestamp, NULL, __pyx_n_s_85); 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_5array_to_datetime, NULL, __pyx_n_s_85); 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 = __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_7isnullobj, NULL, __pyx_n_s_85); 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_8isnullobj2d, NULL, __pyx_n_s_85); 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_9list_to_object_array, NULL, __pyx_n_s_85); 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_80, __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_10fast_unique, NULL, __pyx_n_s_85); 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_11fast_unique_multiple, NULL, __pyx_n_s_85); 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_109, __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_12fast_unique_multiple_list, NULL, __pyx_n_s_85); 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_110, __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_13fast_unique_multiple_list_gen, NULL, __pyx_n_s_85); 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_111, __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_14dicts_to_array, NULL, __pyx_n_s_85); 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_15fast_zip, NULL, __pyx_n_s_85); 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_16has_infs_f4, NULL, __pyx_n_s_85); 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_17has_infs_f8, NULL, __pyx_n_s_85); 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_18convert_timestamps, NULL, __pyx_n_s_85); 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_19scalar_compare, NULL, __pyx_n_s_85); 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_20vec_compare, NULL, __pyx_n_s_85); 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":573
 * @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_21scalar_binop, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 573; __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 = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":591
 * @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_22vec_binop, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Users/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); 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;

  /* "/Users/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(((PyObject *)__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)); 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 (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;

  /* "/Users/wesm/code/pandas/pandas/src/skiplist.pyx":28
 * 
 * # initialize numpy
 * import_array()             # <<<<<<<<<<<<<<
 * 
 * # TODO: optimize this, make less messy
 */
  import_array();

  /* "/Users/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(((PyObject *)__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(((PyObject *)__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(((PyObject *)__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;

  /* "/Users/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_23arrmap, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_24groupby_func, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_25func_groupby_indices, NULL, __pyx_n_s_85); 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_112, __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;

  /* "/Users/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_27groupby_indices, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_28is_lexsorted, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_29group_labels, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_30get_unique_labels, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_31groupsort_indexer, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_32group_add, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_33group_mean, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_34group_var, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_35group_count, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_36lookup_values, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_37reduce_mean, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_38_bucket_locs, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_39count_level_1d, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_40count_level_2d, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_41duplicated, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_42generate_slices, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_43ts_upsample_generic, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_44kth_smallest, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_45median, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_46roll_sum, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_47roll_mean, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_48ewma, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_49_check_minp, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_50roll_var, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_51roll_skew, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_52roll_kurt, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_53roll_median_c, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_54roll_median_cython, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_55roll_max, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_56roll_min, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_57roll_quantile, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_58roll_generic, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_59pad_inplace_float64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_60get_pad_indexer, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_61get_backfill_indexer, NULL, __pyx_n_s_85); 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_113, __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;

  /* "/Users/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_62backfill_inplace_float64, NULL, __pyx_n_s_85); 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_114, __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;

  /* "/Users/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_63ordered_left_join, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_64left_join_2d, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_65left_join_1d, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_66take_join_contiguous, NULL, __pyx_n_s_85); 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_115, __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;

  /* "/Users/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_67merge_indexer_list, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_73merge_indexer_float64, NULL, __pyx_n_s_85); 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_116, __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;

  /* "/Users/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_74merge_indexer_object, NULL, __pyx_n_s_85); 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_117, __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;

  /* "/Users/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_75merge_indexer_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_76merge_indexer_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_77merge_indexer_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_78pad_float64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_79pad_object, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_80pad_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_81pad_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_82pad_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_83backfill_float64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_84backfill_object, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_85backfill_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_86backfill_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_87backfill_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_88pad_2d_inplace_float64, NULL, __pyx_n_s_85); 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_118, __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;

  /* "/Users/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_89pad_2d_inplace_object, NULL, __pyx_n_s_85); 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_119, __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;

  /* "/Users/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_90pad_2d_inplace_int32, NULL, __pyx_n_s_85); 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_120, __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;

  /* "/Users/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_91pad_2d_inplace_int64, NULL, __pyx_n_s_85); 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_121, __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;

  /* "/Users/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_92pad_2d_inplace_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_93backfill_2d_inplace_float64, NULL, __pyx_n_s_85); 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_122, __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;

  /* "/Users/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_94backfill_2d_inplace_object, NULL, __pyx_n_s_85); 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_123, __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;

  /* "/Users/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_95backfill_2d_inplace_int32, NULL, __pyx_n_s_85); 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_124, __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;

  /* "/Users/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_96backfill_2d_inplace_int64, NULL, __pyx_n_s_85); 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_125, __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;

  /* "/Users/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_97backfill_2d_inplace_bool, NULL, __pyx_n_s_85); 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_126, __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;

  /* "/Users/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;

  /* "/Users/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_98take_1d_float64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_99take_1d_object, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_100take_1d_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_101take_1d_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_102take_1d_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_103is_monotonic_float64, NULL, __pyx_n_s_85); 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_127, __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;

  /* "/Users/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_104is_monotonic_object, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_105is_monotonic_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_106is_monotonic_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_107is_monotonic_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_108groupby_float64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_109groupby_object, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_110groupby_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_111groupby_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_112groupby_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_113arrmap_float64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_114arrmap_object, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_115arrmap_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_116arrmap_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_117arrmap_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_118take_2d_axis0_float64, NULL, __pyx_n_s_85); 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_128, __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;

  /* "/Users/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;

  /* "/Users/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_119take_2d_axis0_object, NULL, __pyx_n_s_85); 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_129, __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;

  /* "/Users/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;

  /* "/Users/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_120take_2d_axis0_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_121take_2d_axis0_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_122take_2d_axis0_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_123take_2d_axis1_float64, NULL, __pyx_n_s_85); 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_130, __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;

  /* "/Users/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;

  /* "/Users/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_124take_2d_axis1_object, NULL, __pyx_n_s_85); 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_131, __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;

  /* "/Users/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;

  /* "/Users/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_125take_2d_axis1_int32, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_126take_2d_axis1_int64, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/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_127take_2d_axis1_bool, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_128left_join_indexer_float64, NULL, __pyx_n_s_85); 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_132, __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;

  /* "/Users/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_129left_join_indexer_object, NULL, __pyx_n_s_85); 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_133, __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;

  /* "/Users/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_130left_join_indexer_int32, NULL, __pyx_n_s_85); 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_134, __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;

  /* "/Users/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_131left_join_indexer_int64, NULL, __pyx_n_s_85); 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_135, __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;

  /* "/Users/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_132outer_join_indexer_float64, NULL, __pyx_n_s_85); 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_136, __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;

  /* "/Users/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_133outer_join_indexer_object, NULL, __pyx_n_s_85); 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_137, __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;

  /* "/Users/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_134outer_join_indexer_int32, NULL, __pyx_n_s_85); 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_138, __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;

  /* "/Users/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_135outer_join_indexer_int64, NULL, __pyx_n_s_85); 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_139, __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;

  /* "/Users/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_136inner_join_indexer_float64, NULL, __pyx_n_s_85); 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_140, __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;

  /* "/Users/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_137inner_join_indexer_object, NULL, __pyx_n_s_85); 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_141, __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;

  /* "/Users/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_138inner_join_indexer_int32, NULL, __pyx_n_s_85); 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_142, __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;

  /* "/Users/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_139inner_join_indexer_int64, NULL, __pyx_n_s_85); 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_143, __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;

  /* "/Users/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); 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;

  /* "/Users/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_140reduce, NULL, __pyx_n_s_85); 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;

  /* "/Users/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;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":5
 * cimport util
 * 
 * def rank_1d_float64(object in_arr):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_141rank_1d_float64, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __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 = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":46
 *     return ranks
 * 
 * def rank_2d_float64(object in_arr, axis=0):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_142rank_2d_float64, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __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 = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":93
 *         return ranks
 * 
 * def rank_1d_generic(object in_arr, bint retry=1):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_143rank_1d_generic, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __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 = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":154
 *         return left != right
 * 
 * class Infinity(object):             # <<<<<<<<<<<<<<
 * 
 *     return_false = lambda self, other: False
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":156
 * class Infinity(object):
 * 
 *     return_false = lambda self, other: False             # <<<<<<<<<<<<<<
 *     return_true = lambda self, other: True
 *     __lt__ = return_false
 */
  __pyx_t_4 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_lambda_methdef6pandas_8_tseries_8Infinity_lambda1, NULL, __pyx_n_s_85); 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);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s__return_false, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":157
 * 
 *     return_false = lambda self, other: False
 *     return_true = lambda self, other: True             # <<<<<<<<<<<<<<
 *     __lt__ = return_false
 *     __le__ = return_false
 */
  __pyx_t_4 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_lambda_methdef6pandas_8_tseries_8Infinity_lambda2, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s__return_true, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":158
 *     return_false = lambda self, other: False
 *     return_true = lambda self, other: True
 *     __lt__ = return_false             # <<<<<<<<<<<<<<
 *     __le__ = return_false
 *     __eq__ = return_false
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __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 = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":159
 *     return_true = lambda self, other: True
 *     __lt__ = return_false
 *     __le__ = return_false             # <<<<<<<<<<<<<<
 *     __eq__ = return_false
 *     __ne__ = return_true
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_false); 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);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____le__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":160
 *     __lt__ = return_false
 *     __le__ = return_false
 *     __eq__ = return_false             # <<<<<<<<<<<<<<
 *     __ne__ = return_true
 *     __gt__ = return_true
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __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 = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":161
 *     __le__ = return_false
 *     __eq__ = return_false
 *     __ne__ = return_true             # <<<<<<<<<<<<<<
 *     __gt__ = return_true
 *     __ge__ = return_true
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_true); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __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 = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":162
 *     __eq__ = return_false
 *     __ne__ = return_true
 *     __gt__ = return_true             # <<<<<<<<<<<<<<
 *     __ge__ = return_true
 *     __cmp__ = return_false
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_true); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __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 = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":163
 *     __ne__ = return_true
 *     __gt__ = return_true
 *     __ge__ = return_true             # <<<<<<<<<<<<<<
 *     __cmp__ = return_false
 * 
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_true); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __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 = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":164
 *     __gt__ = return_true
 *     __ge__ = return_true
 *     __cmp__ = return_false             # <<<<<<<<<<<<<<
 * 
 * def rank_2d_generic(object in_arr, axis=0):
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s__return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __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 = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":154
 *         return left != right
 * 
 * class Infinity(object):             # <<<<<<<<<<<<<<
 * 
 *     return_false = lambda self, other: False
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_85); 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_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 = 154; __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;

  /* "/Users/wesm/code/pandas/pandas/src/stats.pyx":166
 *     __cmp__ = return_false
 * 
 * def rank_2d_generic(object in_arr, axis=0):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_144rank_2d_generic, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __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 = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/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));

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":4
 * 
 * _TYPE_MAP = {
 *     np.int8: 'integer',             # <<<<<<<<<<<<<<
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int8); 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_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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":5
 * _TYPE_MAP = {
 *     np.int8: 'integer',
 *     np.int16: 'integer',             # <<<<<<<<<<<<<<
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int16); 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_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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int32); 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_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;

  /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int64); 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_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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint8); 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_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;

  /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__uint16); 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_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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint32); 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_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;

  /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__uint64); 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_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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); 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_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;

  /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float64); 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_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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__complex64); 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_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;

  /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__complex128); 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_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;

  /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__string_); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((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_4); __pyx_t_4 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":17
 *     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 = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__unicode_); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((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_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":18
 *     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 = 18; __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[1]; __pyx_lineno = 18; __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__boolean)) < 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;
  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;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":21
 * }
 * 
 * try:             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float128); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyObject_SetItem(__pyx_t_5, __pyx_t_1, ((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_1); __pyx_t_1 = 0;

      /* "/Users/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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); 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_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_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__complex256); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyObject_SetItem(__pyx_t_1, __pyx_t_4, ((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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); 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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_5 = PyObject_GetAttr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
      if (PyObject_SetItem(__pyx_t_4, __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/Users/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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__datetime64); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyObject_SetItem(__pyx_t_5, __pyx_t_1, ((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_1); __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __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;

    /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":26
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 * except AttributeError:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      PyErr_Restore(0,0,0);
      goto __pyx_L3_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L9_try_end:;
  }

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":29
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_145infer_dtype, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__infer_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_146infer_dtype_list, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__infer_dtype_list, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_147is_bool_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_bool_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":112
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_148is_integer, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_integer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_149is_integer_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_integer_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_150is_float_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_float_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_151is_string_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_string_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_152is_datetime_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_datetime_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_153maybe_convert_numeric, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_144, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_154maybe_convert_objects, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_8, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":332
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_155convert_sql_column, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_sql_column, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_156try_parse_dates, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__try_parse_dates, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":368
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_157sanitize_objects, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sanitize_objects, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":390
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_158maybe_convert_bool, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__maybe_convert_bool, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":412
 * 
 * 
 * def map_infer(ndarray arr, object f):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_159map_infer, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__map_infer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":449
 *     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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_160to_object_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__to_object_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":473
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_161tuples_to_object_array, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_145, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":489
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_162to_object_array_tuples, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_146, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/inference.pyx":520
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_k_87 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_163fast_multiget, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __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 = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Users/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_164get_reverse_indexer, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_165test, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_166test_str, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_167obj_unique, NULL, __pyx_n_s_85); 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;

  /* "/Users/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_168int64_unique, NULL, __pyx_n_s_85); 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;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":580
 *         return uniques
 * 
 * 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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ONAN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":875
 *         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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k_90 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":910
 *         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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k_91 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":977
 *         return labels, counts[:count].copy()
 * 
 *     def factorize(self, ndarray[object] values, sort=False):             # <<<<<<<<<<<<<<
 *         labels, counts = self.get_labels(values)
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k_92 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/hashtable.pyx":1021
 *         return self.uniques
 * 
 * def lookup2(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_169lookup2, NULL, __pyx_n_s_85); 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);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__lookup2, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/join.pyx":1
 * import time             # <<<<<<<<<<<<<<
 * 
 * def inner_join(ndarray[int32_t] left, ndarray[int32_t] right,
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_170inner_join, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__inner_join, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k_93 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_171left_outer_join, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__left_outer_join, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_172full_outer_join, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__full_outer_join, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_173_get_result_indexer, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___get_result_indexer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/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_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_174join_sorter, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__join_sorter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Users/wesm/code/pandas/pandas/src/join.pyx":212
 *     return result, counts
 * 
 * def _big_join_sorter(index):             # <<<<<<<<<<<<<<
 *     pass
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_175_big_join_sorter, NULL, __pyx_n_s_85); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___big_join_sorter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":1
 * cimport numpy as np             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "cpython/type.pxd":2
 * 
 * cdef extern from "Python.h":             # <<<<<<<<<<<<<<
 *     # The C structure of the objects used to describe built-in types.
 * 
 */
  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");
    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 */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}


static 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 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 {
                    /* unexpected keyword found */
                    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 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 *number, *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";
    }
    number = (num_expected == 1) ? "" : "s";
    PyErr_Format(PyExc_TypeError,
        #if PY_VERSION_HEX < 0x02050000
            "%s() takes %s %d positional argument%s (%d given)",
        #else
            "%s() takes %s %zd positional argument%s (%zd given)",
        #endif
        func_name, more_or_less, num_expected, number, num_found);
}

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) {
    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) {
    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;
    }

    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;
}

typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  int new_count, enc_count;
  int is_complex;
  char enc_type;
  char packmode;
} __Pyx_BufFmt_Context;

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->packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 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 void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  char msg[] = {ch, 0};
  PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%s'", msg);
}

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 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': 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': 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_s_long_long;
#endif

static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': 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_s_long_long) - 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;
    }
}

static size_t __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'h': case 'i': case 'l': case 'q': 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;
  if (ctx->enc_type == 0) return 0;
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;

    if (ctx->packmode == '@' || ctx->packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->packmode == '@') {
      int align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      int 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 (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        /* special case -- treat as struct rather than complex number */
        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", ctx->fmt_offset, offset);
      return -1;
    }

    ctx->fmt_offset += size;

    --ctx->enc_count; /* Consume from buffer string */

    /* Done checking, move to next field, pushing or popping struct stack if needed */
    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 int __Pyx_BufFmt_FirstPack(__Pyx_BufFmt_Context* ctx) {
  if (ctx->enc_type != 0 || ctx->packmode != '@') {
    PyErr_SetString(PyExc_ValueError, "Buffer packing mode currently only allowed at beginning of format string (this is a defect)");
    return -1;
  }
  return 0;
}

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;
        }
        if (__Pyx_BufFmt_FirstPack(ctx) == -1) return NULL;
        ctx->packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        if (__Pyx_BufFmt_FirstPack(ctx) == -1) return NULL;
        ctx->packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        if (__Pyx_BufFmt_FirstPack(ctx) == -1) return NULL;
        ctx->packmode = *ts++;
        break;
      case 'T': /* substruct */
        {
          int i;
          const char* ts_after_sub;
          int struct_count = ctx->new_count;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          ++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;
        }
        break;
      case '}': /* end of substruct; either repeat or move on */
        ++ts;
        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;
        ++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':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex) {
          /* Continue pooling same type */
          ctx->enc_count += ctx->new_count;
        } else {
          /* New type */
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_count = ctx->new_count;
          ctx->enc_type = *ts;
          ctx->is_complex = got_Z;
        }
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      default:
        {
          ctx->new_count = __Pyx_BufFmt_ParseNumber(&ts);
          if (ctx->new_count == -1) { /* First char was not a digit */
            char msg[2] = { *ts, 0 };
            PyErr_Format(PyExc_ValueError,
                         "Does not understand character buffer dtype format string ('%s')", msg);
            return NULL;
          }
        }

    }
  }
}

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) {
    __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,
      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,
        #if PY_VERSION_HEX < 0x02050000
                 "need more than %d value%s to unpack", (int)index,
        #else
                 "need more than %zd value%s to unpack", index,
        #endif
                 (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
        #if PY_VERSION_HEX < 0x02050000
            "too many values to unpack (expected %d)", (int)expected);
        #else
            "too many values to unpack (expected %zd)", expected);
        #endif
}

static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
    PyObject *item;
    if (!(item = PyIter_Next(iter))) {
        if (!PyErr_Occurred()) {
            __Pyx_RaiseNeedMoreValuesError(index);
        }
    }
    return item;
}

static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
    PyObject *item;
    if ((item = PyIter_Next(iter))) {
        Py_DECREF(item);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    else if (!PyErr_Occurred())
        return 0;
    else
        return -1;
}

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
}


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 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 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_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 (Py_TYPE(obj)->tp_flags & Py_TPFLAGS_HAVE_NEWBUFFER)
      return PyObject_GetBuffer(obj, view, flags);
  #endif
  if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pf_5numpy_7ndarray___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 (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pf_5numpy_7ndarray_1__releasebuffer__(obj, view);
    Py_DECREF(obj);
    view->obj = NULL;
  }
}

#endif

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    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;
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

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, "__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 PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) {
	__pyx_binding_PyCFunctionType_object *op = PyObject_GC_New(__pyx_binding_PyCFunctionType_object, __pyx_binding_PyCFunctionType);
    if (op == NULL)
        return NULL;
	op->func.m_ml = ml;
	Py_XINCREF(self);
	op->func.m_self = self;
	Py_XINCREF(module);
	op->func.m_module = module;
	PyObject_GC_Track(op);
	return (PyObject *)op;
}

static void __pyx_binding_PyCFunctionType_dealloc(__pyx_binding_PyCFunctionType_object *m) {
	PyObject_GC_UnTrack(m);
	Py_XDECREF(m->func.m_self);
	Py_XDECREF(m->func.m_module);
    PyObject_GC_Del(m);
}

static PyObject *__pyx_binding_PyCFunctionType_descr_get(PyObject *func, PyObject *obj, PyObject *type) {
	if (obj == Py_None)
		obj = NULL;
	return PyMethod_New(func, obj, type);
}

static int __pyx_binding_PyCFunctionType_init(void) {
    __pyx_binding_PyCFunctionType_type = PyCFunction_Type;
    __pyx_binding_PyCFunctionType_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method");
    __pyx_binding_PyCFunctionType_type.tp_dealloc = (destructor)__pyx_binding_PyCFunctionType_dealloc;
    __pyx_binding_PyCFunctionType_type.tp_descr_get = __pyx_binding_PyCFunctionType_descr_get;
    if (PyType_Ready(&__pyx_binding_PyCFunctionType_type) < 0) {
        return -1;
    }
    __pyx_binding_PyCFunctionType = &__pyx_binding_PyCFunctionType_type;
    return 0;

}

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 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 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;
    }
}

#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 PyLong_AsUnsignedLong(x);
        } else {
            return 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 PyLong_AsUnsignedLongLong(x);
        } else {
            return 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 PyLong_AsUnsignedLong(x);
        } else {
            return 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 PyLong_AsUnsignedLongLong(x);
        } else {
            return 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 PyLong_AsUnsignedLong(x);
        } else {
            return 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 PyLong_AsUnsignedLongLong(x);
        } else {
            return 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) {
    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);
    }
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    long 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;
    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(class_name);
    #else
    py_name = PyUnicode_FromString(class_name);
    #endif
    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 > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        PyErr_Warn(NULL, warning);
        #else
        PyErr_WarnEx(NULL, warning, 0);
        #endif
    }
    else if (((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%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 0;
}
#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;

    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(name);
    #else
    py_name = PyUnicode_FromString(name);
    #endif
    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) {
    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 = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        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 */
