/* Generated by Cython 0.17.2 on Sun Feb  9 14:32:59 2014 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#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 CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif


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

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

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__pandas__lib
#define __PYX_HAVE_API__pandas__lib
#include "stdio.h"
#include "stdlib.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "pythread.h"
#include "headers/stdint.h"
#include "datetime.h"
#include "datetime_helper.h"
#include "numpy/ndarrayobject.h"
#include "numpy_helper.h"
#include "numpy/npy_common.h"
#include "datetime/np_datetime.h"
#include "datetime/np_datetime_strings.h"
#include "math.h"
#include "parse_helper.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


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

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

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


/* Type Conversion Predeclarations */

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

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

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

#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))

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

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


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


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

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

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

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

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

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

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

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

/* "numpy.pxd":740
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float16    float16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t
 */
typedef npy_float16 __pyx_t_5numpy_float16_t;

/* "numpy.pxd":741
 * 
 * ctypedef npy_float16    float16_t
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

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

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

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

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

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

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

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

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

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

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

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

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

/* "pandas/lib.pyx":40
 * cdef int64_t NPY_NAT = util.get_nat()
 * 
 * ctypedef unsigned char UChar             # <<<<<<<<<<<<<<
 * 
 * cimport util
 */
typedef unsigned char __pyx_t_6pandas_3lib_UChar;
#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

#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


/*--- Type declarations ---*/
struct __pyx_obj_6pandas_3lib_BlockSlider;
struct __pyx_obj_6pandas_3lib_SeriesBinGrouper;
struct __pyx_obj_6pandas_3lib_cache_readonly;
struct __pyx_obj_6pandas_3lib_AxisProperty;
struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time;
struct __pyx_obj_6pandas_3lib_SeriesGrouper;
struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates;
struct __pyx_obj_6pandas_3lib__PandasNull;
struct __pyx_obj_6pandas_3lib_Reducer;
struct __pyx_obj_6pandas_3lib_Slider;

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

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

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

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

/* "pandas/src/reduce.pyx":529
 *     return results, mutated
 * 
 * cdef class BlockSlider:             # <<<<<<<<<<<<<<
 *     '''
 *     Only capable of sliding on axis=0
 */
struct __pyx_obj_6pandas_3lib_BlockSlider {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *__pyx_vtab;
  PyObject *frame;
  PyObject *dummy;
  int nblocks;
  struct __pyx_obj_6pandas_3lib_Slider *idx_slider;
  PyObject *blocks;
  char **base_ptrs;
};


/* "pandas/src/reduce.pyx":157
 * 
 * 
 * cdef class SeriesBinGrouper:             # <<<<<<<<<<<<<<
 *     '''
 *     Performs grouping operation according to bin edges, rather than labels
 */
struct __pyx_obj_6pandas_3lib_SeriesBinGrouper {
  PyObject_HEAD
  Py_ssize_t nresults;
  Py_ssize_t ngroups;
  int passed_dummy;
  PyObject *arr;
  PyObject *index;
  PyObject *dummy_arr;
  PyObject *dummy_index;
  PyObject *values;
  PyObject *f;
  PyObject *bins;
  PyObject *typ;
  PyObject *name;
};


/* "pandas/src/properties.pyx":4
 * 
 * 
 * cdef class cache_readonly(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
struct __pyx_obj_6pandas_3lib_cache_readonly {
  PyObject_HEAD
  PyObject *func;
  PyObject *name;
  PyObject *allow_setting;
};


/* "pandas/src/properties.pyx":53
 *         PyDict_SetItem(cache, self.name, value)
 * 
 * cdef class AxisProperty(object):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t axis
 */
struct __pyx_obj_6pandas_3lib_AxisProperty {
  PyObject_HEAD
  Py_ssize_t axis;
};


/* "pandas/src/inference.pyx":677
 *     return result
 * 
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,             # <<<<<<<<<<<<<<
 *                             date_parser=None, time_parser=None,
 *                             dayfirst=False,default=None):
 */
struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time {
  PyObject_HEAD
  PyObject *__pyx_v_date;
  PyObject *__pyx_v_dayfirst;
  PyObject *__pyx_v_default;
  PyObject *__pyx_v_parse;
  PyObject *__pyx_v_time;
};


/* "pandas/src/reduce.pyx":285
 * 
 * 
 * cdef class SeriesGrouper:             # <<<<<<<<<<<<<<
 *     '''
 *     Performs generic grouping operation while avoiding ndarray construction
 */
struct __pyx_obj_6pandas_3lib_SeriesGrouper {
  PyObject_HEAD
  Py_ssize_t nresults;
  Py_ssize_t ngroups;
  int passed_dummy;
  PyObject *arr;
  PyObject *index;
  PyObject *dummy_arr;
  PyObject *dummy_index;
  PyObject *f;
  PyObject *labels;
  PyObject *values;
  PyObject *typ;
  PyObject *name;
};


/* "pandas/src/inference.pyx":629
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,             # <<<<<<<<<<<<<<
 *                     dayfirst=False,default=None):
 *     cdef:
 */
struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates {
  PyObject_HEAD
  PyObject *__pyx_v_dayfirst;
  PyObject *__pyx_v_default;
  PyObject *__pyx_v_parse;
};


/* "pandas/lib.pyx":1056
 *     return counts
 * 
 * cdef class _PandasNull:             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(_PandasNull self, object other, int op):
 */
struct __pyx_obj_6pandas_3lib__PandasNull {
  PyObject_HEAD
};


/* "pandas/src/reduce.pyx":9
 * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2'
 * 
 * cdef class Reducer:             # <<<<<<<<<<<<<<
 *     '''
 *     Performs generic reduction operation on a C or Fortran-contiguous ndarray
 */
struct __pyx_obj_6pandas_3lib_Reducer {
  PyObject_HEAD
  Py_ssize_t increment;
  Py_ssize_t chunksize;
  Py_ssize_t nresults;
  PyObject *arr;
  PyObject *dummy;
  PyObject *f;
  PyObject *labels;
  PyObject *typ;
  PyObject *index;
};


/* "pandas/src/reduce.pyx":426
 *     return res
 * 
 * cdef class Slider:             # <<<<<<<<<<<<<<
 *     '''
 *     Only handles contiguous data for now
 */
struct __pyx_obj_6pandas_3lib_Slider {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_3lib_Slider *__pyx_vtab;
  PyArrayObject *values;
  PyArrayObject *buf;
  Py_ssize_t stride;
  Py_ssize_t orig_len;
  Py_ssize_t orig_stride;
  char *orig_data;
};



struct __pyx_vtabstruct_6pandas_3lib_Slider {
  PyObject *(*advance)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch);
  PyObject *(*move)(struct __pyx_obj_6pandas_3lib_Slider *, int, int);
  PyObject *(*set_length)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch);
  PyObject *(*reset)(struct __pyx_obj_6pandas_3lib_Slider *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_3lib_Slider *__pyx_vtabptr_6pandas_3lib_Slider;


/* "pandas/src/reduce.pyx":529
 *     return results, mutated
 * 
 * cdef class BlockSlider:             # <<<<<<<<<<<<<<
 *     '''
 *     Only capable of sliding on axis=0
 */

struct __pyx_vtabstruct_6pandas_3lib_BlockSlider {
  PyObject *(*move)(struct __pyx_obj_6pandas_3lib_BlockSlider *, int, int, int __pyx_skip_dispatch);
  PyObject *(*reset)(struct __pyx_obj_6pandas_3lib_BlockSlider *);
};
static struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *__pyx_vtabptr_6pandas_3lib_BlockSlider;
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

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

static 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 CYTHON_COMPILING_IN_CPYTHON
    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));
#else
    return PySequence_GetItem(o, i);
#endif
}
#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 CYTHON_COMPILING_IN_CPYTHON
    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));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

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

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

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

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

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

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

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

static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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

#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
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 CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/

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

#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    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

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

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

#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 CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {  /* inlined PySequence_SetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return -1;
                i += l;
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PySequence_Check(o) && !PyDict_Check(o)) {
#else
    if (PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static CYTHON_INLINE int __Pyx_mod_int(int, int); /* proto */

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

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

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0)

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
    ((ob)->ob_type == &PySet_Type || \
     (ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
#define PySet_Size(anyset) \
    PyObject_Size((anyset))
#define PySet_Contains(anyset, key) \
    PySequence_Contains((anyset), (key))
#define PySet_Pop(set) \
    PyObject_CallMethod(set, (char *)"pop", NULL)
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5  */

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

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

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


  static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};

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

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);

static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *);

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

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

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64);

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t);

#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_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 __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*);

static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject *);

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

static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *);

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 unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

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

static int __Pyx_check_binary_version(void);

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

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

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

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

static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

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


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

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

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

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

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

/* Module declarations from 'numpy' */

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

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

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

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

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

/* Module declarations from '__builtin__' */

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from 'cpython' */

/* Module declarations from 'datetime' */

/* Module declarations from 'datetime' */
static PyTypeObject *__pyx_ptype_8datetime_date = 0;
static PyTypeObject *__pyx_ptype_8datetime_datetime = 0;
static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0;
static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/

/* Module declarations from 'pandas.tslib' */
static PyObject *(*__pyx_f_6pandas_5tslib_convert_to_tsobject)(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *(*__pyx_f_6pandas_5tslib_convert_to_timedelta64)(PyObject *, PyObject *, PyObject *); /*proto*/

/* 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 PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/

/* Module declarations from 'pandas.lib' */
static PyTypeObject *__pyx_ptype_6pandas_3lib__PandasNull = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_Reducer = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesBinGrouper = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesGrouper = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_Slider = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_BlockSlider = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_cache_readonly = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_AxisProperty = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0;
static double __pyx_v_6pandas_3lib_NaN;
static double __pyx_v_6pandas_3lib_nan;
static double __pyx_v_6pandas_3lib_NAN;
static __pyx_t_5numpy_int64_t __pyx_v_6pandas_3lib_NPY_NAT;
static int __pyx_v_6pandas_3lib__EPOCH_ORD;
static double __pyx_v_6pandas_3lib_INF;
static double __pyx_v_6pandas_3lib_NEGINF;
static double __pyx_v_6pandas_3lib_fINT64_MAX;
static double __pyx_v_6pandas_3lib_fINT64_MIN;
static PyObject *__pyx_f_6pandas_3lib_map_indices_list(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_gmtime(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_to_datetime(__pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_to_timestamp(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_get_timedelta64_value(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_checknull(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_checknull_old(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pandas_3lib__extract_result(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_null_datetimelike(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_datetime(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_date(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_time(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_timedelta(PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int64_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 };
#define __Pyx_MODULE_NAME "pandas.lib"
int __pyx_module_is_main_pandas__lib = 0;

/* Implementation of 'pandas.lib' */
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_pf_6pandas_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_10time64_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_20isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_22isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_24isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_26isnullobj2d_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_28list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_30fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_32fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_34fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_38dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_40fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_42get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_44has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_46has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_48convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_50maybe_indices_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_54scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_56vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_58scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_60vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_62astype_intsafe(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_new_dtype); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_68max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_nan_rep, PyObject *__pyx_v_replace); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_74arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_84group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_86lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static Py_hash_t __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_92fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels); /* proto */
static int __pyx_pf_6pandas_3lib_7Reducer___init__(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_7Reducer_4get_result(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_res); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_bins, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_6Slider___init__(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_6Slider_2advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_6Slider_4set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_6Slider_6reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_100apply_frame_axis0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_f, PyObject *__pyx_v_names, PyArrayObject *__pyx_v_starts, PyArrayObject *__pyx_v_ends); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider___init__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_frame); /* proto */
static void __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_4move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_102reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels); /* proto */
static int __pyx_pf_6pandas_3lib_14cache_readonly___init__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_allow_setting); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_2__call__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, CYTHON_UNUSED PyObject *__pyx_v_doc); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4__get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_typ); /* proto */
static int __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_12AxisProperty___init__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_12AxisProperty_2__get__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static int __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_104infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_106infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_108is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_110is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_112is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_114is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_116is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_118is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_120is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_122is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_124is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_126is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_128is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_132is_date_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_134is_time_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_136is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_138is_period_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_140maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty, PyObject *__pyx_v_coerce_numeric); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_142maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe, int __pyx_v_convert_datetime, int __pyx_v_convert_timedelta); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_144convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_146try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_148try_parse_date_and_time(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dates, PyArrayObject *__pyx_v_times, PyObject *__pyx_v_date_parser, PyObject *__pyx_v_time_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_150try_parse_year_month_day(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_152try_parse_datetime_components(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days, PyArrayObject *__pyx_v_hours, PyArrayObject *__pyx_v_minutes, PyArrayObject *__pyx_v_seconds); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_154sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_156maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_158map_infer_mask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, PyArrayObject *__pyx_v_mask, int __pyx_v_convert); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_160map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, int __pyx_v_convert); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_162to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_164tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_166to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_168fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static char __pyx_k_2[] = "all arrays must be same length";
static char __pyx_k_6[] = "Unrecognized operator";
static char __pyx_k_8[] = "Arrays were different lengths: %d vs %d";
static char __pyx_k_10[] = "M8[ns]";
static char __pyx_k_11[] = "m8[ns]";
static char __pyx_k_12[] = "maybe_convert_objects";
static char __pyx_k_13[] = "Invalid length for values or for binner";
static char __pyx_k_15[] = "Values falls before first bin";
static char __pyx_k_17[] = "Values falls after last bin";
static char __pyx_k_24[] = "Dummy array must be same dtype";
static char __pyx_k_26[] = "Dummy array must be length %d";
static char __pyx_k_27[] = "function does not reduce";
static char __pyx_k_37[] = "_has_complex_internals";
static char __pyx_k_38[] = "Cannot modify frame index internals";
static char __pyx_k_40[] = "Function unsafe for fast apply";
static char __pyx_k_42[] = "Let this error raise above us";
static char __pyx_k_44[] = "Cannot use shortcut";
static char __pyx_k_47[] = "cannot set values for [%s]";
static char __pyx_k_48[] = "list_to_object_array";
static char __pyx_k_50[] = "is_timedelta_or_timedelta64_array";
static char __pyx_k_51[] = "is_integer_float_array";
static char __pyx_k_52[] = "mixed-integer-float";
static char __pyx_k_53[] = "mixed-integer";
static char __pyx_k_54[] = "pandas.tseries.period";
static char __pyx_k_57[] = "Empty string encountered";
static char __pyx_k_59[] = ".";
static char __pyx_k_61[] = "%m/%d/%Y";
static char __pyx_k_62[] = "dateutil.parser";
static char __pyx_k_63[] = "pandas.lib";
static char __pyx_k_66[] = "pandas/src/inference.pyx";
static char __pyx_k_67[] = "";
static char __pyx_k_69[] = "%H:%M:%S";
static char __pyx_k_70[] = "Length of dates and times must be equal";
static char __pyx_k_76[] = "Length of years/months/days must all be equal";
static char __pyx_k_78[] = "Length of all datetime components must be equal";
static char __pyx_k_83[] = "Unable to parse %s";
static char __pyx_k_84[] = "ndarray is not C contiguous";
static char __pyx_k_86[] = "ndarray is not Fortran contiguous";
static char __pyx_k_88[] = "Non-native byte order not supported";
static char __pyx_k_90[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_91[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_94[] = "Format string allocated too short.";
static char __pyx_k_96[] = "index out of bounds";
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__b[] = "b";
static char __pyx_k__d[] = "d";
static char __pyx_k__f[] = "f";
static char __pyx_k__g[] = "g";
static char __pyx_k__h[] = "h";
static char __pyx_k__i[] = "i";
static char __pyx_k__j[] = "j";
static char __pyx_k__k[] = "k";
static char __pyx_k__l[] = "l";
static char __pyx_k__m[] = "m";
static char __pyx_k__n[] = "n";
static char __pyx_k__o[] = "o";
static char __pyx_k__q[] = "q";
static char __pyx_k__s[] = "s";
static char __pyx_k__t[] = "t";
static char __pyx_k__v[] = "v";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
static char __pyx_k_101[] = "/mnt/home/jreback/pandas/pandas/lib.pyx";
static char __pyx_k_124[] = "fast_unique_multiple";
static char __pyx_k_127[] = "fast_unique_multiple_list";
static char __pyx_k_130[] = "fast_unique_multiple_list_gen";
static char __pyx_k_145[] = "maybe_indices_to_slice";
static char __pyx_k_148[] = "maybe_booleans_to_slice";
static char __pyx_k_163[] = "max_len_string_array";
static char __pyx_k_166[] = "string_array_replace_from_nan_rep";
static char __pyx_k_179[] = "row_bool_subset_object";
static char __pyx_k_196[] = "distutils.version";
static char __pyx_k_197[] = "1.6.2";
static char __pyx_k_198[] = "is_numpy_prior_1_6_2";
static char __pyx_k_201[] = "pandas/src/reduce.pyx";
static char __pyx_k_230[] = "is_timedelta64_array";
static char __pyx_k_243[] = "maybe_convert_numeric";
static char __pyx_k_252[] = "try_parse_date_and_time";
static char __pyx_k_255[] = "try_parse_year_month_day";
static char __pyx_k_258[] = "try_parse_datetime_components";
static char __pyx_k_271[] = "tuples_to_object_array";
static char __pyx_k_274[] = "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__bc[] = "bc";
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__i8[] = "i8";
static char __pyx_k__it[] = "it";
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__ns[] = "ns";
static char __pyx_k__op[] = "op";
static char __pyx_k__vc[] = "vc";
static char __pyx_k__NaN[] = "NaN";
static char __pyx_k__NaT[] = "NaT";
static char __pyx_k__arr[] = "arr";
static char __pyx_k__buf[] = "buf";
static char __pyx_k__c16[] = "c16";
static char __pyx_k__col[] = "col";
static char __pyx_k__cur[] = "cur";
static char __pyx_k__day[] = "day";
static char __pyx_k__doc[] = "doc";
static char __pyx_k__end[] = "end";
static char __pyx_k__gen[] = "gen";
static char __pyx_k__gin[] = "gin";
static char __pyx_k__idx[] = "idx";
static char __pyx_k__inf[] = "inf";
static char __pyx_k__lab[] = "lab";
static char __pyx_k__nan[] = "nan";
static char __pyx_k__now[] = "now";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__out[] = "out";
static char __pyx_k__pos[] = "pos";
static char __pyx_k__pre[] = "pre";
static char __pyx_k__row[] = "row";
static char __pyx_k__sum[] = "sum";
static char __pyx_k__tmp[] = "tmp";
static char __pyx_k__tup[] = "tup";
static char __pyx_k__val[] = "val";
static char __pyx_k__TRUE[] = "TRUE";
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__bins[] = "bins";
static char __pyx_k__cols[] = "cols";
static char __pyx_k__copy[] = "copy";
static char __pyx_k__data[] = "data";
static char __pyx_k__date[] = "date";
static char __pyx_k__days[] = "days";
static char __pyx_k__ends[] = "ends";
static char __pyx_k__fill[] = "fill";
static char __pyx_k__flag[] = "flag";
static char __pyx_k__fnan[] = "fnan";
static char __pyx_k__func[] = "func";
static char __pyx_k__fval[] = "fval";
static char __pyx_k__hour[] = "hour";
static char __pyx_k__iNaT[] = "iNaT";
static char __pyx_k__int8[] = "int8";
static char __pyx_k__ints[] = "ints";
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__memo[] = "memo";
static char __pyx_k__move[] = "move";
static char __pyx_k__name[] = "name";
static char __pyx_k__ndim[] = "ndim";
static char __pyx_k__onan[] = "onan";
static char __pyx_k__rows[] = "rows";
static char __pyx_k__safe[] = "safe";
static char __pyx_k__secs[] = "secs";
static char __pyx_k__seen[] = "seen";
static char __pyx_k__size[] = "size";
static char __pyx_k__stub[] = "stub";
static char __pyx_k__time[] = "time";
static char __pyx_k__true[] = "true";
static char __pyx_k__type[] = "type";
static char __pyx_k__vecs[] = "vecs";
static char __pyx_k__view[] = "view";
static char __pyx_k__year[] = "year";
static char __pyx_k__FALSE[] = "FALSE";
static char __pyx_k__False[] = "False";
static char __pyx_k___data[] = "_data";
static char __pyx_k__arobj[] = "arobj";
static char __pyx_k__bool_[] = "bool_";
static char __pyx_k__bools[] = "bools";
static char __pyx_k__cache[] = "cache";
static char __pyx_k__chunk[] = "chunk";
static char __pyx_k__dates[] = "dates";
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__false[] = "false";
static char __pyx_k__flags[] = "flags";
static char __pyx_k__frame[] = "frame";
static char __pyx_k__hours[] = "hours";
static char __pyx_k__index[] = "index";
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__l_bin[] = "l_bin";
static char __pyx_k__lists[] = "lists";
static char __pyx_k__mixed[] = "mixed";
static char __pyx_k__month[] = "month";
static char __pyx_k__names[] = "names";
static char __pyx_k__ncols[] = "ncols";
static char __pyx_k__numpy[] = "numpy";
static char __pyx_k__parse[] = "parse";
static char __pyx_k__piece[] = "piece";
static char __pyx_k__r_bin[] = "r_bin";
static char __pyx_k__range[] = "range";
static char __pyx_k__ravel[] = "ravel";
static char __pyx_k__reset[] = "reset";
static char __pyx_k__right[] = "right";
static char __pyx_k__shape[] = "shape";
static char __pyx_k__slobj[] = "slobj";
static char __pyx_k__start[] = "start";
static char __pyx_k__table[] = "table";
static char __pyx_k__times[] = "times";
static char __pyx_k__tslib[] = "tslib";
static char __pyx_k__uint8[] = "uint8";
static char __pyx_k__value[] = "value";
static char __pyx_k__years[] = "years";
static char __pyx_k__zeros[] = "zeros";
static char __pyx_k__Period[] = "Period";
static char __pyx_k___block[] = "_block";
static char __pyx_k___cache[] = "_cache";
static char __pyx_k___index[] = "_index";
static char __pyx_k__arrays[] = "arrays";
static char __pyx_k__arrmap[] = "arrmap";
static char __pyx_k__astype[] = "astype";
static char __pyx_k__binner[] = "binner";
static char __pyx_k__blocks[] = "blocks";
static char __pyx_k__closed[] = "closed";
static char __pyx_k__counts[] = "counts";
static char __pyx_k__floats[] = "floats";
static char __pyx_k__labels[] = "labels";
static char __pyx_k__lenbin[] = "lenbin";
static char __pyx_k__length[] = "length";
static char __pyx_k__lenidx[] = "lenidx";
static char __pyx_k__micros[] = "micros";
static char __pyx_k__minute[] = "minute";
static char __pyx_k__months[] = "months";
static char __pyx_k__neginf[] = "neginf";
static char __pyx_k__objbuf[] = "objbuf";
static char __pyx_k__object[] = "object";
static char __pyx_k__output[] = "output";
static char __pyx_k__pandas[] = "pandas";
static char __pyx_k__parser[] = "parser";
static char __pyx_k__period[] = "period";
static char __pyx_k__pydate[] = "pydate";
static char __pyx_k__reduce[] = "reduce";
static char __pyx_k__result[] = "result";
static char __pyx_k__second[] = "second";
static char __pyx_k__series[] = "series";
static char __pyx_k__slider[] = "slider";
static char __pyx_k__starts[] = "starts";
static char __pyx_k__status[] = "status";
static char __pyx_k__string[] = "string";
static char __pyx_k__tuples[] = "tuples";
static char __pyx_k__uint16[] = "uint16";
static char __pyx_k__uint32[] = "uint32";
static char __pyx_k__uint64[] = "uint64";
static char __pyx_k__values[] = "values";
static char __pyx_k__writer[] = "writer";
static char __pyx_k____len__[] = "__len__";
static char __pyx_k___engine[] = "_engine";
static char __pyx_k___values[] = "_values";
static char __pyx_k__advance[] = "advance";
static char __pyx_k__boolean[] = "boolean";
static char __pyx_k__columns[] = "columns";
static char __pyx_k__complex[] = "complex";
static char __pyx_k__convert[] = "convert";
static char __pyx_k__default[] = "default";
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__mapping[] = "mapping";
static char __pyx_k__max_bin[] = "max_bin";
static char __pyx_k__minutes[] = "minutes";
static char __pyx_k__mutated[] = "mutated";
static char __pyx_k__nan_rep[] = "nan_rep";
static char __pyx_k__ngroups[] = "ngroups";
static char __pyx_k__nlevels[] = "nlevels";
static char __pyx_k__object_[] = "object_";
static char __pyx_k__objects[] = "objects";
static char __pyx_k__putmask[] = "putmask";
static char __pyx_k__reducer[] = "reducer";
static char __pyx_k__replace[] = "replace";
static char __pyx_k__results[] = "results";
static char __pyx_k__seconds[] = "seconds";
static char __pyx_k__started[] = "started";
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____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__datetime[] = "datetime";
static char __pyx_k__dayfirst[] = "dayfirst";
static char __pyx_k__fast_zip[] = "fast_zip";
static char __pyx_k__finished[] = "finished";
static char __pyx_k__float128[] = "float128";
static char __pyx_k__floating[] = "floating";
static char __pyx_k__ismember[] = "ismember";
static char __pyx_k__isscalar[] = "isscalar";
static char __pyx_k__itemsize[] = "itemsize";
static char __pyx_k__na_count[] = "na_count";
static char __pyx_k__ndarrays[] = "ndarrays";
static char __pyx_k__operator[] = "operator";
static char __pyx_k__seen_int[] = "seen_int";
static char __pyx_k__strptime[] = "strptime";
static char __pyx_k__unicode_[] = "unicode_";
static char __pyx_k__val_kind[] = "val_kind";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__Timestamp[] = "Timestamp";
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__complexes[] = "complexes";
static char __pyx_k__converted[] = "converted";
static char __pyx_k__datetimes[] = "datetimes";
static char __pyx_k__enumerate[] = "enumerate";
static char __pyx_k__is_period[] = "is_period";
static char __pyx_k__isnullobj[] = "isnullobj";
static char __pyx_k__map_infer[] = "map_infer";
static char __pyx_k__na_values[] = "na_values";
static char __pyx_k__new_dtype[] = "new_dtype";
static char __pyx_k__seen_bool[] = "seen_bool";
static char __pyx_k__seen_null[] = "seen_null";
static char __pyx_k__take_last[] = "take_last";
static char __pyx_k__timedelta[] = "timedelta";
static char __pyx_k__toordinal[] = "toordinal";
static char __pyx_k__true_vals[] = "true_vals";
static char __pyx_k__try_float[] = "try_float";
static char __pyx_k__vec_binop[] = "vec_binop";
static char __pyx_k__writerows[] = "writerows";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__all_arrays[] = "all_arrays";
static char __pyx_k__complex128[] = "complex128";
static char __pyx_k__complex256[] = "complex256";
static char __pyx_k__contiguous[] = "contiguous";
static char __pyx_k__data_index[] = "data_index";
static char __pyx_k__datetime64[] = "datetime64";
static char __pyx_k__duplicated[] = "duplicated";
static char __pyx_k__false_vals[] = "false_vals";
static char __pyx_k__fill_value[] = "fill_value";
static char __pyx_k__float_secs[] = "float_secs";
static char __pyx_k__get_result[] = "get_result";
static char __pyx_k__group_size[] = "group_size";
static char __pyx_k__idatetimes[] = "idatetimes";
static char __pyx_k__is_integer[] = "is_integer";
static char __pyx_k__item_cache[] = "item_cache";
static char __pyx_k__parse_date[] = "parse_date";
static char __pyx_k__parse_time[] = "parse_time";
static char __pyx_k__pydatetime[] = "pydatetime";
static char __pyx_k__seen_float[] = "seen_float";
static char __pyx_k__set_length[] = "set_length";
static char __pyx_k__timedeltas[] = "timedeltas";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k____setattr__[] = "__setattr__";
static char __pyx_k____version__[] = "__version__";
static char __pyx_k___item_cache[] = "_item_cache";
static char __pyx_k__date_parser[] = "date_parser";
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__is_datelike[] = "is_datelike";
static char __pyx_k__isnullobj2d[] = "isnullobj2d";
static char __pyx_k__itimedeltas[] = "itimedeltas";
static char __pyx_k__microsecond[] = "microsecond";
static char __pyx_k__pandas_null[] = "pandas_null";
static char __pyx_k__rev_indexer[] = "rev_indexer";
static char __pyx_k__seen_object[] = "seen_object";
static char __pyx_k__time_parser[] = "time_parser";
static char __pyx_k__timedelta64[] = "timedelta64";
static char __pyx_k__true_values[] = "true_values";
static char __pyx_k__vec_compare[] = "vec_compare";
static char __pyx_k__InvalidApply[] = "InvalidApply";
static char __pyx_k__LooseVersion[] = "LooseVersion";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k___check_dummy[] = "_check_dummy";
static char __pyx_k__c_contiguous[] = "c_contiguous";
static char __pyx_k__f_contiguous[] = "f_contiguous";
static char __pyx_k__false_values[] = "false_values";
static char __pyx_k__indices_fast[] = "indices_fast";
static char __pyx_k__is_lexsorted[] = "is_lexsorted";
static char __pyx_k__right_closed[] = "right_closed";
static char __pyx_k__scalar_binop[] = "scalar_binop";
static char __pyx_k__seen_complex[] = "seen_complex";
static char __pyx_k__seen_numeric[] = "seen_numeric";
static char __pyx_k__shape_before[] = "shape_before";
static char __pyx_k__OverflowError[] = "OverflowError";
static char __pyx_k__allow_setting[] = "allow_setting";
static char __pyx_k__clear_mapping[] = "clear_mapping";
static char __pyx_k__convert_empty[] = "convert_empty";
static char __pyx_k__fast_multiget[] = "fast_multiget";
static char __pyx_k__fromtimestamp[] = "fromtimestamp";
static char __pyx_k__is_bool_array[] = "is_bool_array";
static char __pyx_k__is_date_array[] = "is_date_array";
static char __pyx_k__is_time_array[] = "is_time_array";
static char __pyx_k__isnullobj_old[] = "isnullobj_old";
static char __pyx_k__lookup_values[] = "lookup_values";
static char __pyx_k__seen_datetime[] = "seen_datetime";
static char __pyx_k__sorted_labels[] = "sorted_labels";
static char __pyx_k__AttributeError[] = "AttributeError";
static char __pyx_k__astype_intsafe[] = "astype_intsafe";
static char __pyx_k__coerce_numeric[] = "coerce_numeric";
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__is_float_array[] = "is_float_array";
static char __pyx_k__list_of_arrays[] = "list_of_arrays";
static char __pyx_k__map_infer_mask[] = "map_infer_mask";
static char __pyx_k__scalar_compare[] = "scalar_compare";
static char __pyx_k__seen_timedelta[] = "seen_timedelta";
static char __pyx_k__write_csv_rows[] = "write_csv_rows";
static char __pyx_k__fast_zip_fillna[] = "fast_zip_fillna";
static char __pyx_k__generate_slices[] = "generate_slices";
static char __pyx_k__is_period_array[] = "is_period_array";
static char __pyx_k__is_string_array[] = "is_string_array";
static char __pyx_k__isnullobj2d_old[] = "isnullobj2d_old";
static char __pyx_k__row_bool_subset[] = "row_bool_subset";
static char __pyx_k__to_object_array[] = "to_object_array";
static char __pyx_k__try_parse_dates[] = "try_parse_dates";
static char __pyx_k__clean_index_list[] = "clean_index_list";
static char __pyx_k__convert_datetime[] = "convert_datetime";
static char __pyx_k__infer_dtype_list[] = "infer_dtype_list";
static char __pyx_k__is_integer_array[] = "is_integer_array";
static char __pyx_k__is_unicode_array[] = "is_unicode_array";
static char __pyx_k__repr_timedelta64[] = "repr_timedelta64";
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__apply_frame_axis0[] = "apply_frame_axis0";
static char __pyx_k__convert_timedelta[] = "convert_timedelta";
static char __pyx_k__is_datetime_array[] = "is_datetime_array";
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__generate_bins_dt64[] = "generate_bins_dt64";
static char __pyx_k__is_timedelta_array[] = "is_timedelta_array";
static char __pyx_k__maybe_convert_bool[] = "maybe_convert_bool";
static char __pyx_k__time64_to_datetime[] = "time64_to_datetime";
static char __pyx_k__get_reverse_indexer[] = "get_reverse_indexer";
static char __pyx_k__is_datetime64_array[] = "is_datetime64_array";
static PyObject *__pyx_kp_s_10;
static PyObject *__pyx_kp_s_101;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_n_s_12;
static PyObject *__pyx_n_s_124;
static PyObject *__pyx_n_s_127;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_n_s_130;
static PyObject *__pyx_n_s_145;
static PyObject *__pyx_n_s_148;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_n_s_163;
static PyObject *__pyx_n_s_166;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_n_s_179;
static PyObject *__pyx_n_s_196;
static PyObject *__pyx_kp_s_197;
static PyObject *__pyx_n_s_198;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_201;
static PyObject *__pyx_n_s_230;
static PyObject *__pyx_kp_s_24;
static PyObject *__pyx_n_s_243;
static PyObject *__pyx_n_s_252;
static PyObject *__pyx_n_s_255;
static PyObject *__pyx_n_s_258;
static PyObject *__pyx_kp_s_26;
static PyObject *__pyx_kp_s_27;
static PyObject *__pyx_n_s_271;
static PyObject *__pyx_n_s_274;
static PyObject *__pyx_n_s_37;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_kp_s_40;
static PyObject *__pyx_kp_s_42;
static PyObject *__pyx_kp_s_44;
static PyObject *__pyx_kp_s_47;
static PyObject *__pyx_n_s_48;
static PyObject *__pyx_n_s_50;
static PyObject *__pyx_n_s_51;
static PyObject *__pyx_kp_s_52;
static PyObject *__pyx_kp_s_53;
static PyObject *__pyx_n_s_54;
static PyObject *__pyx_kp_s_57;
static PyObject *__pyx_kp_s_59;
static PyObject *__pyx_kp_s_6;
static PyObject *__pyx_kp_s_61;
static PyObject *__pyx_n_s_62;
static PyObject *__pyx_n_s_63;
static PyObject *__pyx_kp_s_66;
static PyObject *__pyx_kp_s_67;
static PyObject *__pyx_kp_s_69;
static PyObject *__pyx_kp_s_70;
static PyObject *__pyx_kp_s_76;
static PyObject *__pyx_kp_s_78;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_kp_s_83;
static PyObject *__pyx_kp_u_84;
static PyObject *__pyx_kp_u_86;
static PyObject *__pyx_kp_u_88;
static PyObject *__pyx_kp_u_90;
static PyObject *__pyx_kp_u_91;
static PyObject *__pyx_kp_u_94;
static PyObject *__pyx_kp_s_96;
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__False;
static PyObject *__pyx_n_s__ImportError;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_s__InvalidApply;
static PyObject *__pyx_n_s__LooseVersion;
static PyObject *__pyx_n_s__N;
static PyObject *__pyx_n_s__NaN;
static PyObject *__pyx_n_s__NaT;
static PyObject *__pyx_n_s__O;
static PyObject *__pyx_n_s__OverflowError;
static PyObject *__pyx_n_s__Period;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__TRUE;
static PyObject *__pyx_n_s__Timestamp;
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____len__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____setattr__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s____version__;
static PyObject *__pyx_n_s___block;
static PyObject *__pyx_n_s___cache;
static PyObject *__pyx_n_s___check_dummy;
static PyObject *__pyx_n_s___data;
static PyObject *__pyx_n_s___engine;
static PyObject *__pyx_n_s___get_result_array;
static PyObject *__pyx_n_s___index;
static PyObject *__pyx_n_s___item_cache;
static PyObject *__pyx_n_s___set_axis;
static PyObject *__pyx_n_s___values;
static PyObject *__pyx_n_s__advance;
static PyObject *__pyx_n_s__all_arrays;
static PyObject *__pyx_n_s__allow_setting;
static PyObject *__pyx_n_s__apply_frame_axis0;
static PyObject *__pyx_n_s__args;
static PyObject *__pyx_n_s__arobj;
static PyObject *__pyx_n_s__arr;
static PyObject *__pyx_n_s__array_to_timestamp;
static PyObject *__pyx_n_s__arrays;
static PyObject *__pyx_n_s__arrmap;
static PyObject *__pyx_n_s__astype;
static PyObject *__pyx_n_s__astype_intsafe;
static PyObject *__pyx_n_s__axes;
static PyObject *__pyx_n_s__axis;
static PyObject *__pyx_n_s__bc;
static PyObject *__pyx_n_s__binner;
static PyObject *__pyx_n_s__bins;
static PyObject *__pyx_n_s__blocks;
static PyObject *__pyx_n_s__bool_;
static PyObject *__pyx_n_s__boolean;
static PyObject *__pyx_n_s__bools;
static PyObject *__pyx_n_s__buf;
static PyObject *__pyx_n_s__c16;
static PyObject *__pyx_n_s__c_contiguous;
static PyObject *__pyx_n_s__cache;
static PyObject *__pyx_n_s__chunk;
static PyObject *__pyx_n_s__clean_index_list;
static PyObject *__pyx_n_s__clear_mapping;
static PyObject *__pyx_n_s__closed;
static PyObject *__pyx_n_s__coerce_numeric;
static PyObject *__pyx_n_s__col;
static PyObject *__pyx_n_s__cols;
static PyObject *__pyx_n_s__columns;
static PyObject *__pyx_n_s__complex;
static PyObject *__pyx_n_s__complex128;
static PyObject *__pyx_n_s__complex256;
static PyObject *__pyx_n_s__complexes;
static PyObject *__pyx_n_s__contiguous;
static PyObject *__pyx_n_s__convert;
static PyObject *__pyx_n_s__convert_datetime;
static PyObject *__pyx_n_s__convert_empty;
static PyObject *__pyx_n_s__convert_sql_column;
static PyObject *__pyx_n_s__convert_timedelta;
static PyObject *__pyx_n_s__convert_timestamps;
static PyObject *__pyx_n_s__converted;
static PyObject *__pyx_n_s__copy;
static PyObject *__pyx_n_s__count_level_1d;
static PyObject *__pyx_n_s__count_level_2d;
static PyObject *__pyx_n_s__counts;
static PyObject *__pyx_n_s__cur;
static PyObject *__pyx_n_s__d;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__data_index;
static PyObject *__pyx_n_s__date;
static PyObject *__pyx_n_s__date_parser;
static PyObject *__pyx_n_s__dates;
static PyObject *__pyx_n_s__datetime;
static PyObject *__pyx_n_s__datetime64;
static PyObject *__pyx_n_s__datetimes;
static PyObject *__pyx_n_s__day;
static PyObject *__pyx_n_s__dayfirst;
static PyObject *__pyx_n_s__days;
static PyObject *__pyx_n_s__default;
static PyObject *__pyx_n_s__dicts;
static PyObject *__pyx_n_s__dicts_to_array;
static PyObject *__pyx_n_s__doc;
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__end;
static PyObject *__pyx_n_s__ends;
static PyObject *__pyx_n_s__enumerate;
static PyObject *__pyx_n_s__eq;
static PyObject *__pyx_n_s__f;
static PyObject *__pyx_n_s__f8;
static PyObject *__pyx_n_s__f_contiguous;
static PyObject *__pyx_n_s__false;
static PyObject *__pyx_n_s__false_vals;
static PyObject *__pyx_n_s__false_values;
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__fast_zip_fillna;
static PyObject *__pyx_n_s__fill;
static PyObject *__pyx_n_s__fill_value;
static PyObject *__pyx_n_s__finished;
static PyObject *__pyx_n_s__flag;
static PyObject *__pyx_n_s__flags;
static PyObject *__pyx_n_s__float128;
static PyObject *__pyx_n_s__float16;
static PyObject *__pyx_n_s__float32;
static PyObject *__pyx_n_s__float64;
static PyObject *__pyx_n_s__float_secs;
static PyObject *__pyx_n_s__floating;
static PyObject *__pyx_n_s__floats;
static PyObject *__pyx_n_s__fnan;
static PyObject *__pyx_n_s__frame;
static PyObject *__pyx_n_s__fromtimestamp;
static PyObject *__pyx_n_s__func;
static PyObject *__pyx_n_s__fval;
static PyObject *__pyx_n_s__ge;
static PyObject *__pyx_n_s__gen;
static PyObject *__pyx_n_s__generate_bins_dt64;
static PyObject *__pyx_n_s__generate_slices;
static PyObject *__pyx_n_s__get_result;
static PyObject *__pyx_n_s__get_reverse_indexer;
static PyObject *__pyx_n_s__gin;
static PyObject *__pyx_n_s__group_count;
static PyObject *__pyx_n_s__group_size;
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__hour;
static PyObject *__pyx_n_s__hours;
static PyObject *__pyx_n_s__i;
static PyObject *__pyx_n_s__i8;
static PyObject *__pyx_n_s__iNaT;
static PyObject *__pyx_n_s__idatetimes;
static PyObject *__pyx_n_s__idx;
static PyObject *__pyx_n_s__index;
static PyObject *__pyx_n_s__indexer;
static PyObject *__pyx_n_s__indices;
static PyObject *__pyx_n_s__indices_fast;
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__int16;
static PyObject *__pyx_n_s__int32;
static PyObject *__pyx_n_s__int64;
static PyObject *__pyx_n_s__int8;
static PyObject *__pyx_n_s__integer;
static PyObject *__pyx_n_s__ints;
static PyObject *__pyx_n_s__is_bool_array;
static PyObject *__pyx_n_s__is_date_array;
static PyObject *__pyx_n_s__is_datelike;
static PyObject *__pyx_n_s__is_datetime64_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_period;
static PyObject *__pyx_n_s__is_period_array;
static PyObject *__pyx_n_s__is_string_array;
static PyObject *__pyx_n_s__is_time_array;
static PyObject *__pyx_n_s__is_timedelta_array;
static PyObject *__pyx_n_s__is_unicode_array;
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__isnullobj2d_old;
static PyObject *__pyx_n_s__isnullobj_old;
static PyObject *__pyx_n_s__isscalar;
static PyObject *__pyx_n_s__it;
static PyObject *__pyx_n_s__item;
static PyObject *__pyx_n_s__item_cache;
static PyObject *__pyx_n_s__itemsize;
static PyObject *__pyx_n_s__itimedeltas;
static PyObject *__pyx_n_s__j;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__keys;
static PyObject *__pyx_n_s__l;
static PyObject *__pyx_n_s__l_bin;
static PyObject *__pyx_n_s__lab;
static PyObject *__pyx_n_s__labels;
static PyObject *__pyx_n_s__le;
static PyObject *__pyx_n_s__left;
static PyObject *__pyx_n_s__lenbin;
static PyObject *__pyx_n_s__length;
static PyObject *__pyx_n_s__lenidx;
static PyObject *__pyx_n_s__list_of_arrays;
static PyObject *__pyx_n_s__lists;
static PyObject *__pyx_n_s__lookup_values;
static PyObject *__pyx_n_s__lt;
static PyObject *__pyx_n_s__m;
static PyObject *__pyx_n_s__map_infer;
static PyObject *__pyx_n_s__map_infer_mask;
static PyObject *__pyx_n_s__mapping;
static PyObject *__pyx_n_s__mask;
static PyObject *__pyx_n_s__max_bin;
static PyObject *__pyx_n_s__maybe_convert_bool;
static PyObject *__pyx_n_s__memo;
static PyObject *__pyx_n_s__micros;
static PyObject *__pyx_n_s__microsecond;
static PyObject *__pyx_n_s__minute;
static PyObject *__pyx_n_s__minutes;
static PyObject *__pyx_n_s__mixed;
static PyObject *__pyx_n_s__month;
static PyObject *__pyx_n_s__months;
static PyObject *__pyx_n_s__move;
static PyObject *__pyx_n_s__mutated;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__na_count;
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__nan_rep;
static PyObject *__pyx_n_s__ncols;
static PyObject *__pyx_n_s__ndarrays;
static PyObject *__pyx_n_s__ndim;
static PyObject *__pyx_n_s__ne;
static PyObject *__pyx_n_s__neginf;
static PyObject *__pyx_n_s__new_dtype;
static PyObject *__pyx_n_s__ngroups;
static PyObject *__pyx_n_s__nlevels;
static PyObject *__pyx_n_s__now;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_s__ns;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__o;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__objbuf;
static PyObject *__pyx_n_s__object;
static PyObject *__pyx_n_s__object_;
static PyObject *__pyx_n_s__objects;
static PyObject *__pyx_n_s__onan;
static PyObject *__pyx_n_s__op;
static PyObject *__pyx_n_s__operator;
static PyObject *__pyx_n_s__out;
static PyObject *__pyx_n_s__output;
static PyObject *__pyx_n_s__pandas;
static PyObject *__pyx_n_s__pandas_null;
static PyObject *__pyx_n_s__parse;
static PyObject *__pyx_n_s__parse_date;
static PyObject *__pyx_n_s__parse_time;
static PyObject *__pyx_n_s__parser;
static PyObject *__pyx_n_s__period;
static PyObject *__pyx_n_s__piece;
static PyObject *__pyx_n_s__pos;
static PyObject *__pyx_n_s__pre;
static PyObject *__pyx_n_s__putmask;
static PyObject *__pyx_n_s__pydate;
static PyObject *__pyx_n_s__pydatetime;
static PyObject *__pyx_n_s__r_bin;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__ravel;
static PyObject *__pyx_n_s__reduce;
static PyObject *__pyx_n_s__reducer;
static PyObject *__pyx_n_s__replace;
static PyObject *__pyx_n_s__repr_timedelta64;
static PyObject *__pyx_n_s__reset;
static PyObject *__pyx_n_s__result;
static PyObject *__pyx_n_s__results;
static PyObject *__pyx_n_s__rev_indexer;
static PyObject *__pyx_n_s__right;
static PyObject *__pyx_n_s__right_closed;
static PyObject *__pyx_n_s__row;
static PyObject *__pyx_n_s__row_bool_subset;
static PyObject *__pyx_n_s__rows;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__safe;
static PyObject *__pyx_n_s__sanitize_objects;
static PyObject *__pyx_n_s__scalar_binop;
static PyObject *__pyx_n_s__scalar_compare;
static PyObject *__pyx_n_s__second;
static PyObject *__pyx_n_s__seconds;
static PyObject *__pyx_n_s__secs;
static PyObject *__pyx_n_s__seen;
static PyObject *__pyx_n_s__seen_bool;
static PyObject *__pyx_n_s__seen_complex;
static PyObject *__pyx_n_s__seen_datetime;
static PyObject *__pyx_n_s__seen_float;
static PyObject *__pyx_n_s__seen_int;
static PyObject *__pyx_n_s__seen_null;
static PyObject *__pyx_n_s__seen_numeric;
static PyObject *__pyx_n_s__seen_object;
static PyObject *__pyx_n_s__seen_timedelta;
static PyObject *__pyx_n_s__series;
static PyObject *__pyx_n_s__set_length;
static PyObject *__pyx_n_s__shape;
static PyObject *__pyx_n_s__shape_before;
static PyObject *__pyx_n_s__size;
static PyObject *__pyx_n_s__slider;
static PyObject *__pyx_n_s__slobj;
static PyObject *__pyx_n_s__sorted_labels;
static PyObject *__pyx_n_s__start;
static PyObject *__pyx_n_s__started;
static PyObject *__pyx_n_s__starts;
static PyObject *__pyx_n_s__status;
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__stub;
static PyObject *__pyx_n_s__sum;
static PyObject *__pyx_n_s__t;
static PyObject *__pyx_n_s__table;
static PyObject *__pyx_n_s__take_last;
static PyObject *__pyx_n_s__time;
static PyObject *__pyx_n_s__time64_to_datetime;
static PyObject *__pyx_n_s__time_parser;
static PyObject *__pyx_n_s__timedelta;
static PyObject *__pyx_n_s__timedelta64;
static PyObject *__pyx_n_s__timedeltas;
static PyObject *__pyx_n_s__times;
static PyObject *__pyx_n_s__tmp;
static PyObject *__pyx_n_s__to_object_array;
static PyObject *__pyx_n_s__toordinal;
static PyObject *__pyx_n_s__true;
static PyObject *__pyx_n_s__true_vals;
static PyObject *__pyx_n_s__true_values;
static PyObject *__pyx_n_s__try_float;
static PyObject *__pyx_n_s__try_parse_dates;
static PyObject *__pyx_n_s__tslib;
static PyObject *__pyx_n_s__tup;
static PyObject *__pyx_n_s__tuples;
static PyObject *__pyx_n_s__type;
static PyObject *__pyx_n_s__uint16;
static PyObject *__pyx_n_s__uint32;
static PyObject *__pyx_n_s__uint64;
static PyObject *__pyx_n_s__uint8;
static PyObject *__pyx_n_s__unicode;
static PyObject *__pyx_n_s__unicode_;
static PyObject *__pyx_n_s__uniques;
static PyObject *__pyx_n_s__utcfromtimestamp;
static PyObject *__pyx_n_s__v;
static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__val_kind;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__vc;
static PyObject *__pyx_n_s__vec_binop;
static PyObject *__pyx_n_s__vec_compare;
static PyObject *__pyx_n_s__vecs;
static PyObject *__pyx_n_s__view;
static PyObject *__pyx_n_s__write_csv_rows;
static PyObject *__pyx_n_s__writer;
static PyObject *__pyx_n_s__writerows;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__y;
static PyObject *__pyx_n_s__year;
static PyObject *__pyx_n_s__years;
static PyObject *__pyx_n_s__zeros;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_15;
static PyObject *__pyx_k_19;
static PyObject *__pyx_k_21;
static PyObject *__pyx_k_46;
static PyObject *__pyx_k_55;
static PyObject *__pyx_k_56;
static PyObject *__pyx_k_60;
static PyObject *__pyx_k_68;
static PyObject *__pyx_k_80;
static PyObject *__pyx_k_81;
static PyObject *__pyx_k_tuple_1;
static PyObject *__pyx_k_tuple_3;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_9;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_16;
static PyObject *__pyx_k_tuple_18;
static PyObject *__pyx_k_tuple_20;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_25;
static PyObject *__pyx_k_tuple_28;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_30;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_32;
static PyObject *__pyx_k_tuple_33;
static PyObject *__pyx_k_tuple_34;
static PyObject *__pyx_k_tuple_35;
static PyObject *__pyx_k_tuple_36;
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_49;
static PyObject *__pyx_k_tuple_58;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_71;
static PyObject *__pyx_k_tuple_72;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_77;
static PyObject *__pyx_k_tuple_79;
static PyObject *__pyx_k_tuple_82;
static PyObject *__pyx_k_tuple_85;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_89;
static PyObject *__pyx_k_tuple_92;
static PyObject *__pyx_k_tuple_93;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_97;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_102;
static PyObject *__pyx_k_tuple_104;
static PyObject *__pyx_k_tuple_106;
static PyObject *__pyx_k_tuple_108;
static PyObject *__pyx_k_tuple_110;
static PyObject *__pyx_k_tuple_112;
static PyObject *__pyx_k_tuple_114;
static PyObject *__pyx_k_tuple_116;
static PyObject *__pyx_k_tuple_118;
static PyObject *__pyx_k_tuple_120;
static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_125;
static PyObject *__pyx_k_tuple_128;
static PyObject *__pyx_k_tuple_131;
static PyObject *__pyx_k_tuple_133;
static PyObject *__pyx_k_tuple_135;
static PyObject *__pyx_k_tuple_137;
static PyObject *__pyx_k_tuple_139;
static PyObject *__pyx_k_tuple_141;
static PyObject *__pyx_k_tuple_143;
static PyObject *__pyx_k_tuple_146;
static PyObject *__pyx_k_tuple_149;
static PyObject *__pyx_k_tuple_151;
static PyObject *__pyx_k_tuple_153;
static PyObject *__pyx_k_tuple_155;
static PyObject *__pyx_k_tuple_157;
static PyObject *__pyx_k_tuple_159;
static PyObject *__pyx_k_tuple_161;
static PyObject *__pyx_k_tuple_164;
static PyObject *__pyx_k_tuple_167;
static PyObject *__pyx_k_tuple_169;
static PyObject *__pyx_k_tuple_171;
static PyObject *__pyx_k_tuple_173;
static PyObject *__pyx_k_tuple_175;
static PyObject *__pyx_k_tuple_177;
static PyObject *__pyx_k_tuple_180;
static PyObject *__pyx_k_tuple_182;
static PyObject *__pyx_k_tuple_184;
static PyObject *__pyx_k_tuple_186;
static PyObject *__pyx_k_tuple_188;
static PyObject *__pyx_k_tuple_190;
static PyObject *__pyx_k_tuple_192;
static PyObject *__pyx_k_tuple_194;
static PyObject *__pyx_k_tuple_199;
static PyObject *__pyx_k_tuple_202;
static PyObject *__pyx_k_tuple_204;
static PyObject *__pyx_k_tuple_206;
static PyObject *__pyx_k_tuple_208;
static PyObject *__pyx_k_tuple_210;
static PyObject *__pyx_k_tuple_212;
static PyObject *__pyx_k_tuple_214;
static PyObject *__pyx_k_tuple_216;
static PyObject *__pyx_k_tuple_218;
static PyObject *__pyx_k_tuple_220;
static PyObject *__pyx_k_tuple_222;
static PyObject *__pyx_k_tuple_224;
static PyObject *__pyx_k_tuple_226;
static PyObject *__pyx_k_tuple_228;
static PyObject *__pyx_k_tuple_231;
static PyObject *__pyx_k_tuple_233;
static PyObject *__pyx_k_tuple_235;
static PyObject *__pyx_k_tuple_237;
static PyObject *__pyx_k_tuple_239;
static PyObject *__pyx_k_tuple_241;
static PyObject *__pyx_k_tuple_244;
static PyObject *__pyx_k_tuple_246;
static PyObject *__pyx_k_tuple_248;
static PyObject *__pyx_k_tuple_250;
static PyObject *__pyx_k_tuple_253;
static PyObject *__pyx_k_tuple_256;
static PyObject *__pyx_k_tuple_259;
static PyObject *__pyx_k_tuple_261;
static PyObject *__pyx_k_tuple_263;
static PyObject *__pyx_k_tuple_265;
static PyObject *__pyx_k_tuple_267;
static PyObject *__pyx_k_tuple_269;
static PyObject *__pyx_k_tuple_272;
static PyObject *__pyx_k_tuple_275;
static PyObject *__pyx_k_codeobj_65;
static PyObject *__pyx_k_codeobj_73;
static PyObject *__pyx_k_codeobj_75;
static PyObject *__pyx_k_codeobj_100;
static PyObject *__pyx_k_codeobj_103;
static PyObject *__pyx_k_codeobj_105;
static PyObject *__pyx_k_codeobj_107;
static PyObject *__pyx_k_codeobj_109;
static PyObject *__pyx_k_codeobj_111;
static PyObject *__pyx_k_codeobj_113;
static PyObject *__pyx_k_codeobj_115;
static PyObject *__pyx_k_codeobj_117;
static PyObject *__pyx_k_codeobj_119;
static PyObject *__pyx_k_codeobj_121;
static PyObject *__pyx_k_codeobj_123;
static PyObject *__pyx_k_codeobj_126;
static PyObject *__pyx_k_codeobj_129;
static PyObject *__pyx_k_codeobj_132;
static PyObject *__pyx_k_codeobj_134;
static PyObject *__pyx_k_codeobj_136;
static PyObject *__pyx_k_codeobj_138;
static PyObject *__pyx_k_codeobj_140;
static PyObject *__pyx_k_codeobj_142;
static PyObject *__pyx_k_codeobj_144;
static PyObject *__pyx_k_codeobj_147;
static PyObject *__pyx_k_codeobj_150;
static PyObject *__pyx_k_codeobj_152;
static PyObject *__pyx_k_codeobj_154;
static PyObject *__pyx_k_codeobj_156;
static PyObject *__pyx_k_codeobj_158;
static PyObject *__pyx_k_codeobj_160;
static PyObject *__pyx_k_codeobj_162;
static PyObject *__pyx_k_codeobj_165;
static PyObject *__pyx_k_codeobj_168;
static PyObject *__pyx_k_codeobj_170;
static PyObject *__pyx_k_codeobj_172;
static PyObject *__pyx_k_codeobj_174;
static PyObject *__pyx_k_codeobj_176;
static PyObject *__pyx_k_codeobj_178;
static PyObject *__pyx_k_codeobj_181;
static PyObject *__pyx_k_codeobj_183;
static PyObject *__pyx_k_codeobj_185;
static PyObject *__pyx_k_codeobj_187;
static PyObject *__pyx_k_codeobj_189;
static PyObject *__pyx_k_codeobj_191;
static PyObject *__pyx_k_codeobj_193;
static PyObject *__pyx_k_codeobj_195;
static PyObject *__pyx_k_codeobj_200;
static PyObject *__pyx_k_codeobj_203;
static PyObject *__pyx_k_codeobj_205;
static PyObject *__pyx_k_codeobj_207;
static PyObject *__pyx_k_codeobj_209;
static PyObject *__pyx_k_codeobj_211;
static PyObject *__pyx_k_codeobj_213;
static PyObject *__pyx_k_codeobj_215;
static PyObject *__pyx_k_codeobj_217;
static PyObject *__pyx_k_codeobj_219;
static PyObject *__pyx_k_codeobj_221;
static PyObject *__pyx_k_codeobj_223;
static PyObject *__pyx_k_codeobj_225;
static PyObject *__pyx_k_codeobj_227;
static PyObject *__pyx_k_codeobj_229;
static PyObject *__pyx_k_codeobj_232;
static PyObject *__pyx_k_codeobj_234;
static PyObject *__pyx_k_codeobj_236;
static PyObject *__pyx_k_codeobj_238;
static PyObject *__pyx_k_codeobj_240;
static PyObject *__pyx_k_codeobj_242;
static PyObject *__pyx_k_codeobj_245;
static PyObject *__pyx_k_codeobj_247;
static PyObject *__pyx_k_codeobj_249;
static PyObject *__pyx_k_codeobj_251;
static PyObject *__pyx_k_codeobj_254;
static PyObject *__pyx_k_codeobj_257;
static PyObject *__pyx_k_codeobj_260;
static PyObject *__pyx_k_codeobj_262;
static PyObject *__pyx_k_codeobj_264;
static PyObject *__pyx_k_codeobj_266;
static PyObject *__pyx_k_codeobj_268;
static PyObject *__pyx_k_codeobj_270;
static PyObject *__pyx_k_codeobj_273;
static PyObject *__pyx_k_codeobj_276;

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

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

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

  /* "pandas/lib.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/lib.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);
    if (unlikely(((PyObject *)__pyx_v_index) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __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/lib.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.lib.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_3lib_map_indices_list[] = "\n    Produce a dict mapping the values of the input array to their respective\n    locations.\n\n    Example:\n        array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n    Better to do this with Cython because of the enormous speed boost.\n    ";
static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_list (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), (&PyList_Type), 1, "index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_map_indices_list(__pyx_self, ((PyObject*)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.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_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_list", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_3lib_map_indices_list(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

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

/* "pandas/lib.pyx":85
 * from libc.stdlib cimport malloc, free
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */

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

  /* "pandas/lib.pyx":103
 *         object val
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=np.uint8)
 *     for i in range(n):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":104
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = util.get_value_at(arr, i)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __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 = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __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 = 104; __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 = 104; __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 = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/lib.pyx":105
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = util.get_value_at(arr, i)
 *         if val in values:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/lib.pyx":106
 *     result = np.empty(n, dtype=np.uint8)
 *     for i in range(n):
 *         val = util.get_value_at(arr, i)             # <<<<<<<<<<<<<<
 *         if val in values:
 *             result[i] = 1
 */
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/lib.pyx":107
 *     for i in range(n):
 *         val = util.get_value_at(arr, i)
 *         if val in values:             # <<<<<<<<<<<<<<
 *             result[i] = 1
 *         else:
 */
    __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_values), Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_13) {

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

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

  /* "pandas/lib.pyx":112
 *             result[i] = 0
 * 
 *     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 = 112; __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 = 112; __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 = 112; __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 = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.ismember", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":121
 * 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_3lib_gmtime(PyObject *__pyx_v_date) {
  int __pyx_v_y;
  int __pyx_v_m;
  int __pyx_v_d;
  int __pyx_v_h;
  int __pyx_v_mn;
  int __pyx_v_s;
  int __pyx_v_days;
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gmtime", 0);

  /* "pandas/lib.pyx":124
 *     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_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __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_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/lib.pyx":125
 * 
 *     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_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __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_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/lib.pyx":126
 *     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_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 126; __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_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/lib.pyx":127
 *     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)
 */
  __pyx_v_h = PyDateTime_DATE_GET_HOUR(__pyx_v_date);

  /* "pandas/lib.pyx":128
 *     d = PyDateTime_GET_DAY(date)
 *     h = PyDateTime_DATE_GET_HOUR(date)
 *     mn = PyDateTime_DATE_GET_MINUTE(date)             # <<<<<<<<<<<<<<
 *     s = PyDateTime_DATE_GET_SECOND(date)
 * 
 */
  __pyx_v_mn = PyDateTime_DATE_GET_MINUTE(__pyx_v_date);

  /* "pandas/lib.pyx":129
 *     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
 */
  __pyx_v_s = PyDateTime_DATE_GET_SECOND(__pyx_v_date);

  /* "pandas/lib.pyx":131
 *     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 = 131; __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 = 131; __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 = 131; __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 = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 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_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 = 131; __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 = 131; __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_3lib__EPOCH_ORD); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __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 = 131; __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 = 131; __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 = 131; __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 = 131; __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 = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_days = __pyx_t_5;

  /* "pandas/lib.pyx":132
 * 
 *     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.lib.gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* "pandas/lib.pyx":135
 * 
 * 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 = 135; __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 = 135; __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 = 135; __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 = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __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.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp) {
  __pyx_t_5numpy_int64_t __pyx_v_timestamp;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0);
  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 = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_4to_datetime(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_timestamp));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":134
 *     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_3lib_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_3lib_to_datetime(__pyx_v_timestamp, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __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.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* "pandas/lib.pyx":138
 * 
 * cpdef object to_timestamp(object dt):
 *     return gmtime(dt)             # <<<<<<<<<<<<<<
 * 
 * def array_to_timestamp(ndarray[object, ndim=1] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_3lib_gmtime(__pyx_v_dt)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 138; __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.lib.to_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_timestamp", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_3lib_to_timestamp(__pyx_v_dt, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __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.lib.to_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":162
 *         result[i] = to_datetime(arr[i])
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t get_timedelta64_value(val):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* "pandas/lib.pyx":164
 *     return result
 * 
 * cdef inline int64_t get_timedelta64_value(val):             # <<<<<<<<<<<<<<
 *     return val.view('i8')
 * 
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_get_timedelta64_value(PyObject *__pyx_v_val) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_timedelta64_value", 0);

  /* "pandas/lib.pyx":165
 * 
 * cdef inline int64_t get_timedelta64_value(val):
 *     return val.view('i8')             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_WriteUnraisable("pandas.lib.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":173
 * cdef double NEGINF = -INF
 * 
 * cpdef checknull(object val):             # <<<<<<<<<<<<<<
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val # and val != INF and val != NEGINF
 */

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

  /* "pandas/lib.pyx":174
 * 
 * cpdef checknull(object val):
 *     if util.is_float_object(val) or util.is_complex_object(val):             # <<<<<<<<<<<<<<
 *         return val != val # and val != INF and val != NEGINF
 *     elif util.is_datetime64_object(val):
 */
  __pyx_t_1 = is_float_object(__pyx_v_val);
  if (!__pyx_t_1) {
    __pyx_t_2 = is_complex_object(__pyx_v_val);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":175
 * cpdef checknull(object val):
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val # and val != INF and val != NEGINF             # <<<<<<<<<<<<<<
 *     elif util.is_datetime64_object(val):
 *         return get_datetime64_value(val) == NPY_NAT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":176
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val # and val != INF and val != NEGINF
 *     elif util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *         return get_datetime64_value(val) == NPY_NAT
 *     elif val is NaT:
 */
  __pyx_t_1 = is_datetime64_object(__pyx_v_val);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":177
 *         return val != val # and val != INF and val != NEGINF
 *     elif util.is_datetime64_object(val):
 *         return get_datetime64_value(val) == NPY_NAT             # <<<<<<<<<<<<<<
 *     elif val is NaT:
 *         return True
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong((get_datetime64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":178
 *     elif util.is_datetime64_object(val):
 *         return get_datetime64_value(val) == NPY_NAT
 *     elif val is NaT:             # <<<<<<<<<<<<<<
 *         return True
 *     elif util.is_timedelta64_object(val):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_v_val == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":179
 *         return get_datetime64_value(val) == NPY_NAT
 *     elif val is NaT:
 *         return True             # <<<<<<<<<<<<<<
 *     elif util.is_timedelta64_object(val):
 *         return get_timedelta64_value(val) == NPY_NAT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":180
 *     elif val is NaT:
 *         return True
 *     elif util.is_timedelta64_object(val):             # <<<<<<<<<<<<<<
 *         return get_timedelta64_value(val) == NPY_NAT
 *     elif is_array(val):
 */
  __pyx_t_1 = is_timedelta64_object(__pyx_v_val);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":181
 *         return True
 *     elif util.is_timedelta64_object(val):
 *         return get_timedelta64_value(val) == NPY_NAT             # <<<<<<<<<<<<<<
 *     elif is_array(val):
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_f_6pandas_3lib_get_timedelta64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":182
 *     elif util.is_timedelta64_object(val):
 *         return get_timedelta64_value(val) == NPY_NAT
 *     elif is_array(val):             # <<<<<<<<<<<<<<
 *         return False
 *     else:
 */
  __pyx_t_4 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

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

    /* "pandas/lib.pyx":185
 *         return False
 *     else:
 *         return _checknull(val)             # <<<<<<<<<<<<<<
 * 
 * cpdef checknull_old(object val):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

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

/* "pandas/lib.pyx":173
 * cdef double NEGINF = -INF
 * 
 * cpdef checknull(object val):             # <<<<<<<<<<<<<<
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val # and val != INF and val != NEGINF
 */

static PyObject *__pyx_pf_6pandas_3lib_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("checknull", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_3lib_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __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.lib.checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":187
 *         return _checknull(val)
 * 
 * cpdef checknull_old(object val):             # <<<<<<<<<<<<<<
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val or val == INF or val == NEGINF
 */

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

  /* "pandas/lib.pyx":188
 * 
 * cpdef checknull_old(object val):
 *     if util.is_float_object(val) or util.is_complex_object(val):             # <<<<<<<<<<<<<<
 *         return val != val or val == INF or val == NEGINF
 *     elif util.is_datetime64_object(val):
 */
  __pyx_t_1 = is_float_object(__pyx_v_val);
  if (!__pyx_t_1) {
    __pyx_t_2 = is_complex_object(__pyx_v_val);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":189
 * cpdef checknull_old(object val):
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val or val == INF or val == NEGINF             # <<<<<<<<<<<<<<
 *     elif util.is_datetime64_object(val):
 *         return get_datetime64_value(val) == NPY_NAT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_3) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pandas_3lib_INF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_3) {
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pandas_3lib_NEGINF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __pyx_t_7;
        __pyx_t_7 = 0;
      } else {
        __pyx_t_5 = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __pyx_t_6 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __pyx_t_6 = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":190
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val or val == INF or val == NEGINF
 *     elif util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *         return get_datetime64_value(val) == NPY_NAT
 *     elif val is NaT:
 */
  __pyx_t_1 = is_datetime64_object(__pyx_v_val);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":191
 *         return val != val or val == INF or val == NEGINF
 *     elif util.is_datetime64_object(val):
 *         return get_datetime64_value(val) == NPY_NAT             # <<<<<<<<<<<<<<
 *     elif val is NaT:
 *         return True
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyBool_FromLong((get_datetime64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":192
 *     elif util.is_datetime64_object(val):
 *         return get_datetime64_value(val) == NPY_NAT
 *     elif val is NaT:             # <<<<<<<<<<<<<<
 *         return True
 *     elif util.is_timedelta64_object(val):
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = (__pyx_v_val == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":193
 *         return get_datetime64_value(val) == NPY_NAT
 *     elif val is NaT:
 *         return True             # <<<<<<<<<<<<<<
 *     elif util.is_timedelta64_object(val):
 *         return get_timedelta64_value(val) == NPY_NAT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":194
 *     elif val is NaT:
 *         return True
 *     elif util.is_timedelta64_object(val):             # <<<<<<<<<<<<<<
 *         return get_timedelta64_value(val) == NPY_NAT
 *     elif is_array(val):
 */
  __pyx_t_1 = is_timedelta64_object(__pyx_v_val);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":195
 *         return True
 *     elif util.is_timedelta64_object(val):
 *         return get_timedelta64_value(val) == NPY_NAT             # <<<<<<<<<<<<<<
 *     elif is_array(val):
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyBool_FromLong((__pyx_f_6pandas_3lib_get_timedelta64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":196
 *     elif util.is_timedelta64_object(val):
 *         return get_timedelta64_value(val) == NPY_NAT
 *     elif is_array(val):             # <<<<<<<<<<<<<<
 *         return False
 *     else:
 */
  __pyx_t_6 = __pyx_f_4util_is_array(__pyx_v_val); 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_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 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;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":197
 *         return get_timedelta64_value(val) == NPY_NAT
 *     elif is_array(val):
 *         return False             # <<<<<<<<<<<<<<
 *     else:
 *         return util._checknull(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/lib.pyx":199
 *         return False
 *     else:
 *         return util._checknull(val)             # <<<<<<<<<<<<<<
 * 
 * def isscalar(object val):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.lib.checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checknull_old (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14checknull_old(__pyx_self, ((PyObject *)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":187
 *         return _checknull(val)
 * 
 * cpdef checknull_old(object val):             # <<<<<<<<<<<<<<
 *     if util.is_float_object(val) or util.is_complex_object(val):
 *         return val != val or val == INF or val == NEGINF
 */

static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("checknull_old", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_3lib_checknull_old(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __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.lib.checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_17isscalar(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_17isscalar = {__Pyx_NAMESTR("isscalar"), (PyCFunction)__pyx_pw_6pandas_3lib_17isscalar, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_17isscalar(PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isscalar (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16isscalar(__pyx_self, ((PyObject *)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":201
 *         return util._checknull(val)
 * 
 * def isscalar(object val):             # <<<<<<<<<<<<<<
 *     return np.isscalar(val) or val is None or PyDateTime_Check(val)
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isscalar", 0);

  /* "pandas/lib.pyx":202
 * 
 * def isscalar(object val):
 *     return np.isscalar(val) or val is None or PyDateTime_Check(val)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isscalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __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[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __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_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__pyx_v_val == Py_None);
    if (!__pyx_t_4) {
      __pyx_t_5 = PyDateTime_Check(__pyx_v_val);
      __pyx_t_6 = __pyx_t_5;
    } else {
      __pyx_t_6 = __pyx_t_4;
    }
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __pyx_t_2 = __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.lib.isscalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* "pandas/lib.pyx":207
 * @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_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_arobj = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isnullobj", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

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

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

  /* "pandas/lib.pyx":214
 *     n = len(arr)
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         arobj = arr[i]
 *         result[i] = arobj is NaT or _checknull(arobj)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/lib.pyx":215
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:
 *         arobj = arr[i]             # <<<<<<<<<<<<<<
 *         result[i] = arobj is NaT or _checknull(arobj)
 *     return result.view(np.bool_)
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_arobj);
    __pyx_v_arobj = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/lib.pyx":216
 *     for i from 0 <= i < n:
 *         arobj = arr[i]
 *         result[i] = arobj is NaT or _checknull(arobj)             # <<<<<<<<<<<<<<
 *     return result.view(np.bool_)
 * 
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_13 = (__pyx_v_arobj == __pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!__pyx_t_13) {
      __pyx_t_14 = __pyx_f_4util__checknull(__pyx_v_arobj);
      __pyx_t_15 = __pyx_t_14;
    } else {
      __pyx_t_15 = __pyx_t_13;
    }
    __pyx_t_16 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15;
  }

  /* "pandas/lib.pyx":217
 *         arobj = arr[i]
 *         result[i] = arobj is NaT or _checknull(arobj)
 *     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 = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":241
 * 
 *     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 = 241; __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 = 241; __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 = 241; __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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":271
 * 
 *     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 = 271; __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 = 271; __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 = 271; __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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

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

    /* "pandas/lib.pyx":273
 *     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_old(val):
 */
    __pyx_t_6 = __pyx_v_m;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) {

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

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

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

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

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_6pandas_3lib_28list_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_3lib_29list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_29list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_28list_to_object_array)};
static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_to_object_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_28list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":279
 *     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_3lib_28list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_arr = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject **__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list_to_object_array", 0);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;

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

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

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

    /* "pandas/lib.pyx":292
 * 
 *     for i from 0 <= i < n:
 *         arr[i] = obj[i]             # <<<<<<<<<<<<<<
 * 
 *     return arr
 */
    if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __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 = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_12);
    __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_12);
    *__pyx_t_12 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_12);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":304
 *         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/lib.pyx":306
 *         object val, stub = 0
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         if val not in table:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

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

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

      /* "pandas/lib.pyx":309
 *         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 = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

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

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

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

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

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":327
 *         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/lib.pyx":329
 *         object val, stub = 0
 * 
 *     for i from 0 <= i < k:             # <<<<<<<<<<<<<<
 *         buf = arrays[i]
 *         n = len(buf)
 */
  __pyx_t_1 = __pyx_v_k;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

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

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

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

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

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

        /* "pandas/lib.pyx":335
 *             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 = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

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

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

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

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

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":353
 *         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/lib.pyx":355
 *         object val, stub = 0
 * 
 *     for i from 0 <= i < k:             # <<<<<<<<<<<<<<
 *         buf = lists[i]
 *         n = len(buf)
 */
  __pyx_t_1 = __pyx_v_k;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

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

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

    /* "pandas/lib.pyx":358
 *         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/lib.pyx":359
 *         n = len(buf)
 *         for j from 0 <= j < n:
 *             val = buf[j]             # <<<<<<<<<<<<<<
 *             if val not in table:
 *                 table[val] = stub
 */
      if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_2;
      __pyx_t_2 = 0;

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

        /* "pandas/lib.pyx":361
 *             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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

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

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

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

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

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

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

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

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

  /* "pandas/lib.pyx":376
 *         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 = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/lib.pyx":377
 *         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 = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_table = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

      /* "pandas/lib.pyx":383
 *         n = len(buf)
 *         for j from 0 <= j < n:
 *             val = buf[j]             # <<<<<<<<<<<<<<
 *             if val not in table:
 *                 table[val] = stub
 */
      if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_4;
      __pyx_t_4 = 0;

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

        /* "pandas/lib.pyx":385
 *             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 = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

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

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

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

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

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

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

/* "pandas/lib.pyx":397
 * @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_3lib_38dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_col = 0;
  PyObject *__pyx_v_onan = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject **__pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dicts_to_array", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "pandas/lib.pyx":402
 *         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 = 402; __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 = 402; __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/lib.pyx":404
 *         object col, onan = np.nan
 * 
 *     k = len(columns)             # <<<<<<<<<<<<<<
 *     n = len(dicts)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_columns)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_3;

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

  /* "pandas/lib.pyx":407
 *     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 = 407; __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 = 407; __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 = 407; __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 = 407; __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 = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __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 = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __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 = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/lib.pyx":409
 *     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/lib.pyx":410
 * 
 *     for i in range(n):
 *         row = dicts[i]             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             col = columns[j]
 */
    if (unlikely(((PyObject *)__pyx_v_dicts) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (!(likely(PyDict_CheckExact(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF(((PyObject *)__pyx_v_row));
    __pyx_v_row = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/lib.pyx":411
 *     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/lib.pyx":412
 *         row = dicts[i]
 *         for j in range(k):
 *             col = columns[j]             # <<<<<<<<<<<<<<
 *             if col in row:
 *                 result[i, j] = row[col]
 */
      if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(__pyx_v_columns, __pyx_v_j);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_col);
      __pyx_v_col = __pyx_t_2;
      __pyx_t_2 = 0;

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

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

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

  /* "pandas/lib.pyx":418
 *                 result[i, j] = onan
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def fast_zip(list ndarrays):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

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

/* "pandas/lib.pyx":420
 *     return result
 * 
 * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */

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

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

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

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

  /* "pandas/lib.pyx":436
 * 
 *     # initialize tuples on first pass
 *     arr = ndarrays[0]             # <<<<<<<<<<<<<<
 *     it = <flatiter> PyArray_IterNew(arr)
 *     for i in range(n):
 */
  if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __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 = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_arr = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":437
 *     # 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 = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2);
  __pyx_t_2 = 0;

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

    /* "pandas/lib.pyx":439
 *     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 = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_v_arr;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_2), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/lib.pyx":440
 *     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_5 = ((PyObject *)PyTuple_New(__pyx_v_k)); 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_XDECREF(__pyx_v_tup);
    __pyx_v_tup = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/lib.pyx":442
 *         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/lib.pyx":443
 * 
 *         PyTuple_SET_ITEM(tup, 0, val)
 *         Py_INCREF(val)             # <<<<<<<<<<<<<<
 *         result[i] = tup
 *         PyArray_ITER_NEXT(it)
 */
    Py_INCREF(__pyx_v_val);

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

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

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

    /* "pandas/lib.pyx":448
 * 
 *     for j in range(1, k):
 *         arr = ndarrays[j]             # <<<<<<<<<<<<<<
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 */
    if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __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/lib.pyx":449
 *     for j in range(1, k):
 *         arr = ndarrays[j]
 *         it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *         if len(arr) != n:
 *             raise ValueError('all arrays must be same length')
 */
    __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_it));
    __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2);
    __pyx_t_2 = 0;

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

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

    /* "pandas/lib.pyx":453
 *             raise ValueError('all arrays must 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/lib.pyx":454
 * 
 *         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 = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __pyx_v_arr;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_2), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_5;
      __pyx_t_5 = 0;

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

      /* "pandas/lib.pyx":456
 *             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/lib.pyx":457
 *             PyTuple_SET_ITEM(result[i], j, val)
 *             Py_INCREF(val)
 *             PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      PyArray_ITER_NEXT(__pyx_v_it);
    }
  }

  /* "pandas/lib.pyx":459
 *             PyArray_ITER_NEXT(it)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_43get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_43get_reverse_indexer = {__Pyx_NAMESTR("get_reverse_indexer"), (PyCFunction)__pyx_pw_6pandas_3lib_43get_reverse_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_43get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indexer = 0;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_reverse_indexer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer,&__pyx_n_s__length,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_indexer") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_indexer = ((PyArrayObject *)values[0]);
    __pyx_v_length = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __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[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.get_reverse_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_42get_reverse_indexer(__pyx_self, __pyx_v_indexer, __pyx_v_length);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":461
 *     return result
 * 
 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)
 */

static PyObject *__pyx_pf_6pandas_3lib_42get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_rev_indexer = 0;
  __pyx_t_5numpy_int64_t __pyx_v_idx;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rev_indexer;
  __Pyx_Buffer __pyx_pybuffer_rev_indexer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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_int64_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_reverse_indexer", 0);
  __pyx_pybuffer_rev_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rev_indexer.refcount = 0;
  __pyx_pybuffernd_rev_indexer.data = NULL;
  __pyx_pybuffernd_rev_indexer.rcbuffer = &__pyx_pybuffer_rev_indexer;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":463
 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] rev_indexer
 *         int64_t idx
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":467
 *         int64_t idx
 * 
 *     rev_indexer = np.empty(length, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     rev_indexer.fill(-1)
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __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 = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __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 = 467; __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 = 467; __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 = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rev_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_rev_indexer.diminfo[0].strides = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rev_indexer.diminfo[0].shape = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_rev_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/lib.pyx":468
 * 
 *     rev_indexer = np.empty(length, dtype=np.int64)
 *     rev_indexer.fill(-1)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         idx = indexer[i]
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_rev_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":469
 *     rev_indexer = np.empty(length, dtype=np.int64)
 *     rev_indexer.fill(-1)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         idx = indexer[i]
 *         if idx != -1:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/lib.pyx":470
 *     rev_indexer.fill(-1)
 *     for i in range(n):
 *         idx = indexer[i]             # <<<<<<<<<<<<<<
 *         if idx != -1:
 *             rev_indexer[idx] = i
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides));

    /* "pandas/lib.pyx":471
 *     for i in range(n):
 *         idx = indexer[i]
 *         if idx != -1:             # <<<<<<<<<<<<<<
 *             rev_indexer[idx] = i
 * 
 */
    __pyx_t_14 = (__pyx_v_idx != -1);
    if (__pyx_t_14) {

      /* "pandas/lib.pyx":472
 *         idx = indexer[i]
 *         if idx != -1:
 *             rev_indexer[idx] = i             # <<<<<<<<<<<<<<
 * 
 *     return rev_indexer
 */
      __pyx_t_15 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_rev_indexer.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_rev_indexer.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_rev_indexer.diminfo[0].strides) = __pyx_v_i;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":474
 *             rev_indexer[idx] = i
 * 
 *     return rev_indexer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_rev_indexer));
  __pyx_r = ((PyObject *)__pyx_v_rev_indexer);
  goto __pyx_L0;

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

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

/* "pandas/lib.pyx":477
 * 
 * 
 * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */

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

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

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

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

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

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

    /* "pandas/lib.pyx":487
 *     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/lib.pyx":488
 *         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 = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":489
 *         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 = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

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

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

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

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

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

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

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

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

    /* "pandas/lib.pyx":501
 *     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/lib.pyx":502
 *         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 = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":503
 *         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 = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

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

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

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

  /* "pandas/lib.pyx":508
 *     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 = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_cache = __pyx_t_1;
  __pyx_t_1 = 0;

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

  /* "pandas/lib.pyx":514
 *     # 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 = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/lib.pyx":515
 * 
 *     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 = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_f = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/lib.pyx":517
 *     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 = 517; __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 = 517; __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 = 517; __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 = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __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 = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __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 = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":519
 *     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/lib.pyx":520
 * 
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)             # <<<<<<<<<<<<<<
 *         if val in cache:
 *             out[i] = cache[val]
 */
    __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

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

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

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

  /* "pandas/lib.pyx":526
 *             cache[val] = out[i] = f(val)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * def maybe_indices_to_slice(ndarray[int64_t] indices):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_51maybe_indices_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_51maybe_indices_to_slice = {__Pyx_NAMESTR("maybe_indices_to_slice"), (PyCFunction)__pyx_pw_6pandas_3lib_51maybe_indices_to_slice, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_51maybe_indices_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_indices_to_slice (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_50maybe_indices_to_slice(__pyx_self, ((PyArrayObject *)__pyx_v_indices));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":528
 *     return out
 * 
 * def maybe_indices_to_slice(ndarray[int64_t] indices):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indices)
 */

static PyObject *__pyx_pf_6pandas_3lib_50maybe_indices_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indices;
  __Pyx_Buffer __pyx_pybuffer_indices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  long __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_indices_to_slice", 0);
  __pyx_pybuffer_indices.pybuffer.buf = NULL;
  __pyx_pybuffer_indices.refcount = 0;
  __pyx_pybuffernd_indices.data = NULL;
  __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":530
 * def maybe_indices_to_slice(ndarray[int64_t] indices):
 *     cdef:
 *         Py_ssize_t i, n = len(indices)             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":532
 *         Py_ssize_t i, n = len(indices)
 * 
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return indices
 * 
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/lib.pyx":533
 * 
 *     if n == 0:
 *         return indices             # <<<<<<<<<<<<<<
 * 
 *     for i in range(1, n):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_indices));
    __pyx_r = ((PyObject *)__pyx_v_indices);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":535
 *         return indices
 * 
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         if indices[i] - indices[i - 1] != 1:
 *             return indices
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 1; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "pandas/lib.pyx":536
 * 
 *     for i in range(1, n):
 *         if indices[i] - indices[i - 1] != 1:             # <<<<<<<<<<<<<<
 *             return indices
 *     return slice(indices[0], indices[n - 1] + 1)
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_indices.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = (__pyx_v_i - 1);
    __pyx_t_5 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_indices.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_indices.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indices.diminfo[0].strides))) != 1);
    if (__pyx_t_2) {

      /* "pandas/lib.pyx":537
 *     for i in range(1, n):
 *         if indices[i] - indices[i - 1] != 1:
 *             return indices             # <<<<<<<<<<<<<<
 *     return slice(indices[0], indices[n - 1] + 1)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_indices));
      __pyx_r = ((PyObject *)__pyx_v_indices);
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/lib.pyx":538
 *         if indices[i] - indices[i - 1] != 1:
 *             return indices
 *     return slice(indices[0], indices[n - 1] + 1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_pybuffernd_indices.diminfo[0].shape;
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indices.diminfo[0].strides))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = (__pyx_v_n - 1);
  __pyx_t_5 = -1;
  if (__pyx_t_1 < 0) {
    __pyx_t_1 += __pyx_pybuffernd_indices.diminfo[0].shape;
    if (unlikely(__pyx_t_1 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indices.diminfo[0].strides)) + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __pyx_r = __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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.maybe_indices_to_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_53maybe_booleans_to_slice = {__Pyx_NAMESTR("maybe_booleans_to_slice"), (PyCFunction)__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_mask) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_booleans_to_slice (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(__pyx_self, ((PyArrayObject *)__pyx_v_mask));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":541
 * 
 * 
 * def maybe_booleans_to_slice(ndarray[uint8_t] mask):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(mask)
 */

static PyObject *__pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_end;
  int __pyx_v_started;
  int __pyx_v_finished;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_5numpy_uint8_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_booleans_to_slice", 0);
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":543
 * def maybe_booleans_to_slice(ndarray[uint8_t] mask):
 *     cdef:
 *         Py_ssize_t i, n = len(mask)             # <<<<<<<<<<<<<<
 *         Py_ssize_t start, end
 *         bint started = 0, finished = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":545
 *         Py_ssize_t i, n = len(mask)
 *         Py_ssize_t start, end
 *         bint started = 0, finished = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_v_started = 0;
  __pyx_v_finished = 0;

  /* "pandas/lib.pyx":547
 *         bint started = 0, finished = 0
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             if finished:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pandas/lib.pyx":548
 * 
 *     for i in range(n):
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             if finished:
 *                 return mask.view(np.bool_)
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_5) {

      /* "pandas/lib.pyx":549
 *     for i in range(n):
 *         if mask[i]:
 *             if finished:             # <<<<<<<<<<<<<<
 *                 return mask.view(np.bool_)
 *             if not started:
 */
      if (__pyx_v_finished) {

        /* "pandas/lib.pyx":550
 *         if mask[i]:
 *             if finished:
 *                 return mask.view(np.bool_)             # <<<<<<<<<<<<<<
 *             if not started:
 *                 started = 1
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_mask), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__bool_); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "pandas/lib.pyx":551
 *             if finished:
 *                 return mask.view(np.bool_)
 *             if not started:             # <<<<<<<<<<<<<<
 *                 started = 1
 *                 start = i
 */
      __pyx_t_9 = (!__pyx_v_started);
      if (__pyx_t_9) {

        /* "pandas/lib.pyx":552
 *                 return mask.view(np.bool_)
 *             if not started:
 *                 started = 1             # <<<<<<<<<<<<<<
 *                 start = i
 *         else:
 */
        __pyx_v_started = 1;

        /* "pandas/lib.pyx":553
 *             if not started:
 *                 started = 1
 *                 start = i             # <<<<<<<<<<<<<<
 *         else:
 *             if finished:
 */
        __pyx_v_start = __pyx_v_i;
        goto __pyx_L7;
      }
      __pyx_L7:;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/lib.pyx":555
 *                 start = i
 *         else:
 *             if finished:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      if (__pyx_v_finished) {

        /* "pandas/lib.pyx":556
 *         else:
 *             if finished:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             if started:
 */
        goto __pyx_L3_continue;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "pandas/lib.pyx":558
 *                 continue
 * 
 *             if started:             # <<<<<<<<<<<<<<
 *                 end = i
 *                 finished = 1
 */
      if (__pyx_v_started) {

        /* "pandas/lib.pyx":559
 * 
 *             if started:
 *                 end = i             # <<<<<<<<<<<<<<
 *                 finished = 1
 * 
 */
        __pyx_v_end = __pyx_v_i;

        /* "pandas/lib.pyx":560
 *             if started:
 *                 end = i
 *                 finished = 1             # <<<<<<<<<<<<<<
 * 
 *     if not started:
 */
        __pyx_v_finished = 1;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L5:;
    __pyx_L3_continue:;
  }

  /* "pandas/lib.pyx":562
 *                 finished = 1
 * 
 *     if not started:             # <<<<<<<<<<<<<<
 *         return slice(0, 0)
 *     if not finished:
 */
  __pyx_t_9 = (!__pyx_v_started);
  if (__pyx_t_9) {

    /* "pandas/lib.pyx":563
 * 
 *     if not started:
 *         return slice(0, 0)             # <<<<<<<<<<<<<<
 *     if not finished:
 *         return slice(start, None)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "pandas/lib.pyx":564
 *     if not started:
 *         return slice(0, 0)
 *     if not finished:             # <<<<<<<<<<<<<<
 *         return slice(start, None)
 *     else:
 */
  __pyx_t_9 = (!__pyx_v_finished);
  if (__pyx_t_9) {

    /* "pandas/lib.pyx":565
 *         return slice(0, 0)
 *     if not finished:
 *         return slice(start, None)             # <<<<<<<<<<<<<<
 *     else:
 *         return slice(start, end)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_7, 1, Py_None);
    __Pyx_GIVEREF(Py_None);
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "pandas/lib.pyx":567
 *         return slice(start, None)
 *     else:
 *         return slice(start, end)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_8 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
  }
  __pyx_L11:;

  __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);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.maybe_booleans_to_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

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

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

  /* "pandas/lib.pyx":575
 *     import operator
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[uint8_t, cast=True] result
 *         int flag
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/lib.pyx":580
 *         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 = 580; __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/lib.pyx":581
 * 
 *     if op is operator.lt:
 *         flag = cpython.Py_LT             # <<<<<<<<<<<<<<
 *     elif op is operator.le:
 *         flag = cpython.Py_LE
 */
    __pyx_v_flag = Py_LT;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":582
 *     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 = 582; __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/lib.pyx":583
 *         flag = cpython.Py_LT
 *     elif op is operator.le:
 *         flag = cpython.Py_LE             # <<<<<<<<<<<<<<
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT
 */
    __pyx_v_flag = Py_LE;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":584
 *     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 = 584; __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/lib.pyx":585
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT             # <<<<<<<<<<<<<<
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE
 */
    __pyx_v_flag = Py_GT;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":586
 *     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 = 586; __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/lib.pyx":587
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE             # <<<<<<<<<<<<<<
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ
 */
    __pyx_v_flag = Py_GE;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":588
 *     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 = 588; __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/lib.pyx":589
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ             # <<<<<<<<<<<<<<
 *     elif op is operator.ne:
 *         flag = cpython.Py_NE
 */
    __pyx_v_flag = Py_EQ;
    goto __pyx_L3;
  }

  /* "pandas/lib.pyx":590
 *     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 = 590; __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/lib.pyx":591
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:
 *         flag = cpython.Py_NE             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('Unrecognized operator')
 */
    __pyx_v_flag = Py_NE;
    goto __pyx_L3;
  }
  /*else*/ {

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

  /* "pandas/lib.pyx":595
 *         raise ValueError('Unrecognized operator')
 * 
 *     result = np.empty(n, dtype=bool).view(np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     if flag == cpython.Py_NE:
 */
  __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_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __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 = 595; __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 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), ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __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_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__view); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__uint8); 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_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); 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_1); __pyx_t_1 = 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[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":597
 *     result = np.empty(n, dtype=bool).view(np.uint8)
 * 
 *     if flag == cpython.Py_NE:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             x = values[i]
 */
  __pyx_t_3 = (__pyx_v_flag == Py_NE);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":598
 * 
 *     if flag == cpython.Py_NE:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             x = values[i]
 *             if _checknull(x):
 */
    __pyx_t_2 = __pyx_v_n;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "pandas/lib.pyx":599
 *     if flag == cpython.Py_NE:
 *         for i in range(n):
 *             x = values[i]             # <<<<<<<<<<<<<<
 *             if _checknull(x):
 *                 result[i] = True
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_x);
      __pyx_v_x = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/lib.pyx":600
 *         for i in range(n):
 *             x = values[i]
 *             if _checknull(x):             # <<<<<<<<<<<<<<
 *                 result[i] = True
 *             else:
 */
      __pyx_t_3 = __pyx_f_4util__checknull(__pyx_v_x);
      if (__pyx_t_3) {

        /* "pandas/lib.pyx":601
 *             x = values[i]
 *             if _checknull(x):
 *                 result[i] = True             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)
 */
        __pyx_t_14 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "pandas/lib.pyx":603
 *                 result[i] = True
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(n):
 */
        __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_15 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_3;
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/lib.pyx":605
 *                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)
 *     else:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             x = values[i]
 *             if _checknull(x):
 */
    __pyx_t_2 = __pyx_v_n;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

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

      /* "pandas/lib.pyx":607
 *         for i in range(n):
 *             x = values[i]
 *             if _checknull(x):             # <<<<<<<<<<<<<<
 *                 result[i] = False
 *             else:
 */
      __pyx_t_3 = __pyx_f_4util__checknull(__pyx_v_x);
      if (__pyx_t_3) {

        /* "pandas/lib.pyx":608
 *             x = values[i]
 *             if _checknull(x):
 *                 result[i] = False             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)
 */
        __pyx_t_17 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "pandas/lib.pyx":610
 *                 result[i] = False
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)             # <<<<<<<<<<<<<<
 * 
 *     return result.view(bool)
 */
        __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_18 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_3;
      }
      __pyx_L10:;
    }
  }
  __pyx_L4:;

  /* "pandas/lib.pyx":612
 *                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)
 * 
 *     return result.view(bool)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __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_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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.scalar_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_operator);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* "pandas/lib.pyx":616
 * @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_3lib_56vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) {
  PyObject *__pyx_v_operator = NULL;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  int __pyx_v_flag;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_compare", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

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

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

  /* "pandas/lib.pyx":623
 *         int flag
 * 
 *     if n != len(right):             # <<<<<<<<<<<<<<
 *         raise ValueError('Arrays were different lengths: %d vs %d'
 *                          % (n, len(right)))
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = (__pyx_v_n != __pyx_t_2);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":625
 *     if n != len(right):
 *         raise ValueError('Arrays were different lengths: %d vs %d'
 *                          % (n, len(right)))             # <<<<<<<<<<<<<<
 * 
 *     if op is operator.lt:
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __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 = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":627
 *                          % (n, len(right)))
 * 
 *     if op is operator.lt:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_LT
 *     elif op is operator.le:
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__lt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":628
 * 
 *     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_L4;
  }

  /* "pandas/lib.pyx":629
 *     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_4 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__le); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":630
 *         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_L4;
  }

  /* "pandas/lib.pyx":631
 *     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_4 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__gt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":632
 *         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_L4;
  }

  /* "pandas/lib.pyx":633
 *     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_4 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__ge); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":634
 *         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_L4;
  }

  /* "pandas/lib.pyx":635
 *     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_4 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__eq); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":636
 *         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_L4;
  }

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

    /* "pandas/lib.pyx":638
 *         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_L4;
  }
  /*else*/ {

    /* "pandas/lib.pyx":640
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=bool).view(np.uint8)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L4:;

  /* "pandas/lib.pyx":642
 *         raise ValueError('Unrecognized operator')
 * 
 *     result = np.empty(n, dtype=bool).view(np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     if flag == cpython.Py_NE:
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __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*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __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_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[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/lib.pyx":644
 *     result = np.empty(n, dtype=bool).view(np.uint8)
 * 
 *     if flag == cpython.Py_NE:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             x = left[i]
 */
  __pyx_t_3 = (__pyx_v_flag == Py_NE);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":645
 * 
 *     if flag == cpython.Py_NE:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             x = left[i]
 *             y = right[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;

      /* "pandas/lib.pyx":646
 *     if flag == cpython.Py_NE:
 *         for i in range(n):
 *             x = left[i]             # <<<<<<<<<<<<<<
 *             y = right[i]
 * 
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_x);
      __pyx_v_x = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/lib.pyx":647
 *         for i in range(n):
 *             x = left[i]
 *             y = right[i]             # <<<<<<<<<<<<<<
 * 
 *             if _checknull(x) or _checknull(y):
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_y);
      __pyx_v_y = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/lib.pyx":649
 *             y = right[i]
 * 
 *             if _checknull(x) or _checknull(y):             # <<<<<<<<<<<<<<
 *                 result[i] = True
 *             else:
 */
      __pyx_t_3 = __pyx_f_4util__checknull(__pyx_v_x);
      if (!__pyx_t_3) {
        __pyx_t_15 = __pyx_f_4util__checknull(__pyx_v_y);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_3;
      }
      if (__pyx_t_16) {

        /* "pandas/lib.pyx":650
 * 
 *             if _checknull(x) or _checknull(y):
 *                 result[i] = True             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 */
        __pyx_t_17 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "pandas/lib.pyx":652
 *                 result[i] = True
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(n):
 */
        __pyx_t_16 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_18 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_16;
      }
      __pyx_L8:;
    }
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/lib.pyx":654
 *                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 *     else:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             x = left[i]
 *             y = right[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;

      /* "pandas/lib.pyx":655
 *     else:
 *         for i in range(n):
 *             x = left[i]             # <<<<<<<<<<<<<<
 *             y = right[i]
 * 
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_x);
      __pyx_v_x = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/lib.pyx":656
 *         for i in range(n):
 *             x = left[i]
 *             y = right[i]             # <<<<<<<<<<<<<<
 * 
 *             if _checknull(x) or _checknull(y):
 */
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_y);
      __pyx_v_y = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/lib.pyx":658
 *             y = right[i]
 * 
 *             if _checknull(x) or _checknull(y):             # <<<<<<<<<<<<<<
 *                 result[i] = False
 *             else:
 */
      __pyx_t_16 = __pyx_f_4util__checknull(__pyx_v_x);
      if (!__pyx_t_16) {
        __pyx_t_3 = __pyx_f_4util__checknull(__pyx_v_y);
        __pyx_t_15 = __pyx_t_3;
      } else {
        __pyx_t_15 = __pyx_t_16;
      }
      if (__pyx_t_15) {

        /* "pandas/lib.pyx":659
 * 
 *             if _checknull(x) or _checknull(y):
 *                 result[i] = False             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 */
        __pyx_t_21 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "pandas/lib.pyx":661
 *                 result[i] = False
 *             else:
 *                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)             # <<<<<<<<<<<<<<
 * 
 *     return result.view(bool)
 */
        __pyx_t_15 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_22 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15;
      }
      __pyx_L11:;
    }
  }
  __pyx_L5:;

  /* "pandas/lib.pyx":663
 *                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 * 
 *     return result.view(bool)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __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[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __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;

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

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

/* "pandas/lib.pyx":668
 * @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_3lib_58scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_x = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scalar_binop", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

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

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

  /* "pandas/lib.pyx":675
 * 
 *     result = np.empty(n, dtype=object)
 *     if util._checknull(val):             # <<<<<<<<<<<<<<
 *         result.fill(val)
 *         return result
 */
  __pyx_t_11 = __pyx_f_4util__checknull(__pyx_v_val);
  if (__pyx_t_11) {

    /* "pandas/lib.pyx":676
 *     result = np.empty(n, dtype=object)
 *     if util._checknull(val):
 *         result.fill(val)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __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[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __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_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/lib.pyx":677
 *     if util._checknull(val):
 *         result.fill(val)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":679
 *         return result
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         x = values[i]
 *         if util._checknull(x):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

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

    /* "pandas/lib.pyx":681
 *     for i in range(n):
 *         x = values[i]
 *         if util._checknull(x):             # <<<<<<<<<<<<<<
 *             result[i] = x
 *         else:
 */
    __pyx_t_11 = __pyx_f_4util__checknull(__pyx_v_x);
    if (__pyx_t_11) {

      /* "pandas/lib.pyx":682
 *         x = values[i]
 *         if util._checknull(x):
 *             result[i] = x             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = op(x, val)
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_INCREF(__pyx_v_x); __Pyx_DECREF(*__pyx_t_15);
      *__pyx_t_15 = __pyx_v_x;
      __Pyx_GIVEREF(*__pyx_t_15);
      goto __pyx_L6;
    }
    /*else*/ {

      /* "pandas/lib.pyx":684
 *             result[i] = x
 *         else:
 *             result[i] = op(x, val)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_2 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15);
      *__pyx_t_15 = __pyx_t_2;
      __Pyx_GIVEREF(*__pyx_t_15);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L6:;
  }

  /* "pandas/lib.pyx":686
 *             result[i] = op(x, val)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __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 = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

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

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

/* "pandas/lib.pyx":690
 * @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_3lib_60vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject **__pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_binop", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

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

  /* "pandas/lib.pyx":695
 *         ndarray[object] result
 * 
 *     if n != len(right):             # <<<<<<<<<<<<<<
 *         raise ValueError('Arrays were different lengths: %d vs %d'
 *                          % (n, len(right)))
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_v_n != __pyx_t_1);
  if (__pyx_t_2) {

    /* "pandas/lib.pyx":697
 *     if n != len(right):
 *         raise ValueError('Arrays were different lengths: %d vs %d'
 *                          % (n, len(right)))             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __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 = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":699
 *                          % (n, len(right)))
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __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[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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 = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

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

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

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

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

        /* "pandas/lib.pyx":705
 *         y = right[i]
 *         try:
 *             result[i] = op(x, y)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             if util._checknull(x):
 */
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __Pyx_INCREF(__pyx_v_y);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_y);
        __Pyx_GIVEREF(__pyx_v_y);
        __pyx_t_4 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_16);
        __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_16);
        *__pyx_t_16 = __pyx_t_4;
        __Pyx_GIVEREF(*__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pandas/lib.pyx":706
 *         try:
 *             result[i] = op(x, y)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             if util._checknull(x):
 *                 result[i] = x
 */
      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_3);

        /* "pandas/lib.pyx":707
 *             result[i] = op(x, y)
 *         except TypeError:
 *             if util._checknull(x):             # <<<<<<<<<<<<<<
 *                 result[i] = x
 *             elif util._checknull(y):
 */
        __pyx_t_2 = __pyx_f_4util__checknull(__pyx_v_x);
        if (__pyx_t_2) {

          /* "pandas/lib.pyx":708
 *         except TypeError:
 *             if util._checknull(x):
 *                 result[i] = x             # <<<<<<<<<<<<<<
 *             elif util._checknull(y):
 *                 result[i] = y
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_INCREF(__pyx_v_x); __Pyx_DECREF(*__pyx_t_16);
          *__pyx_t_16 = __pyx_v_x;
          __Pyx_GIVEREF(*__pyx_t_16);
          goto __pyx_L16;
        }

        /* "pandas/lib.pyx":709
 *             if util._checknull(x):
 *                 result[i] = x
 *             elif util._checknull(y):             # <<<<<<<<<<<<<<
 *                 result[i] = y
 *             else:
 */
        __pyx_t_2 = __pyx_f_4util__checknull(__pyx_v_y);
        if (__pyx_t_2) {

          /* "pandas/lib.pyx":710
 *                 result[i] = x
 *             elif util._checknull(y):
 *                 result[i] = y             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_INCREF(__pyx_v_y); __Pyx_DECREF(*__pyx_t_16);
          *__pyx_t_16 = __pyx_v_y;
          __Pyx_GIVEREF(*__pyx_t_16);
          goto __pyx_L16;
        }
        /*else*/ {

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

  /* "pandas/lib.pyx":714
 *                 raise
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __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[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_63astype_intsafe(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_63astype_intsafe = {__Pyx_NAMESTR("astype_intsafe"), (PyCFunction)__pyx_pw_6pandas_3lib_63astype_intsafe, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_63astype_intsafe(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_new_dtype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("astype_intsafe (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__new_dtype,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("astype_intsafe", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "astype_intsafe") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_new_dtype = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("astype_intsafe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.astype_intsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_62astype_intsafe(__pyx_self, __pyx_v_arr, __pyx_v_new_dtype);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":717
 * 
 * 
 * def astype_intsafe(ndarray[object] arr, new_dtype):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */

static PyObject *__pyx_pf_6pandas_3lib_62astype_intsafe(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_new_dtype) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_v = 0;
  int __pyx_v_is_datelike;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __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;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("astype_intsafe", 0);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":719
 * def astype_intsafe(ndarray[object] arr, new_dtype):
 *     cdef:
 *         Py_ssize_t i, n = len(arr)             # <<<<<<<<<<<<<<
 *         object v
 *         bint is_datelike
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":725
 * 
 *     # on 32-bit, 1.6.2 numpy M8[ns] is a subdtype of integer, which is weird
 *     is_datelike = new_dtype in ['M8[ns]','m8[ns]']             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=new_dtype)
 */
  __Pyx_INCREF(__pyx_v_new_dtype);
  __pyx_t_2 = __pyx_v_new_dtype;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_10), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!((int)__pyx_t_4)) {
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_11), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((int)__pyx_t_5);
  } else {
    __pyx_t_6 = ((int)__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_is_datelike = __pyx_t_6;

  /* "pandas/lib.pyx":727
 *     is_datelike = new_dtype in ['M8[ns]','m8[ns]']
 * 
 *     result = np.empty(n, dtype=new_dtype)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = arr[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __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_v_new_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/lib.pyx":728
 * 
 *     result = np.empty(n, dtype=new_dtype)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = arr[i]
 *         if is_datelike and checknull(v):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "pandas/lib.pyx":729
 *     result = np.empty(n, dtype=new_dtype)
 *     for i in range(n):
 *         v = arr[i]             # <<<<<<<<<<<<<<
 *         if is_datelike and checknull(v):
 *            result[i] = NPY_NAT
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_8);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "pandas/lib.pyx":730
 *     for i in range(n):
 *         v = arr[i]
 *         if is_datelike and checknull(v):             # <<<<<<<<<<<<<<
 *            result[i] = NPY_NAT
 *         else:
 */
    __pyx_t_6 = __pyx_v_is_datelike;
    if (__pyx_t_6) {
      __pyx_t_8 = __pyx_f_6pandas_3lib_checknull(__pyx_v_v, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_6;
    }
    if (__pyx_t_5) {

      /* "pandas/lib.pyx":731
 *         v = arr[i]
 *         if is_datelike and checknull(v):
 *            result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *         else:
 *            util.set_value_at(result, i, v)
 */
      __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_3lib_NPY_NAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/lib.pyx":733
 *            result[i] = NPY_NAT
 *         else:
 *            util.set_value_at(result, i, v)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __pyx_f_4util_set_value_at(__pyx_v_result, __pyx_t_8, __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":735
 *            util.set_value_at(result, i, v)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cpdef ndarray[object] astype_str(ndarray arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* "pandas/lib.pyx":737
 *     return result
 * 
 * cpdef ndarray[object] astype_str(ndarray arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = arr.size
 */

static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("astype_str", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "pandas/lib.pyx":739
 * cpdef ndarray[object] astype_str(ndarray arr):
 *     cdef:
 *         Py_ssize_t i, n = arr.size             # <<<<<<<<<<<<<<
 *         ndarray[object] result = np.empty(n, dtype=object)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/lib.pyx":740
 *     cdef:
 *         Py_ssize_t i, n = arr.size
 *         ndarray[object] 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 = 740; __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 = 740; __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 = 740; __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 = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __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 = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __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 = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":742
 *         ndarray[object] result = np.empty(n, dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         util.set_value_at(result, i, str(arr[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/lib.pyx":743
 * 
 *     for i in range(n):
 *         util.set_value_at(result, i, str(arr[i]))             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __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 = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_f_4util_set_value_at(((PyArrayObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __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_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "pandas/lib.pyx":745
 *         util.set_value_at(result, i, str(arr[i]))
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def clean_index_list(list obj):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyArrayObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("astype_str (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_64astype_str(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":737
 *     return result
 * 
 * cpdef ndarray[object] astype_str(ndarray arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = arr.size
 */

static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("astype_str", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_3lib_astype_str(__pyx_v_arr, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __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.lib.astype_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_67clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_6pandas_3lib_66clean_index_list[] = "\n    Utility used in pandas.core.index._ensure_index\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_67clean_index_list = {__Pyx_NAMESTR("clean_index_list"), (PyCFunction)__pyx_pw_6pandas_3lib_67clean_index_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_66clean_index_list)};
static PyObject *__pyx_pw_6pandas_3lib_67clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clean_index_list (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_66clean_index_list(__pyx_self, ((PyObject*)__pyx_v_obj));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":747
 *     return result
 * 
 * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Utility used in pandas.core.index._ensure_index
 */

static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyArrayObject *__pyx_v_converted = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_v = 0;
  int __pyx_v_all_arrays;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_converted;
  __Pyx_Buffer __pyx_pybuffer_converted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyArrayObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject **__pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clean_index_list", 0);
  __pyx_pybuffer_converted.pybuffer.buf = NULL;
  __pyx_pybuffer_converted.refcount = 0;
  __pyx_pybuffernd_converted.data = NULL;
  __pyx_pybuffernd_converted.rcbuffer = &__pyx_pybuffer_converted;

  /* "pandas/lib.pyx":753
 *     cdef:
 *         ndarray[object] converted
 *         Py_ssize_t i, n = len(obj)             # <<<<<<<<<<<<<<
 *         object v
 *         bint all_arrays = 1
 */
  if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":755
 *         Py_ssize_t i, n = len(obj)
 *         object v
 *         bint all_arrays = 1             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_v_all_arrays = 1;

  /* "pandas/lib.pyx":757
 *         bint all_arrays = 1
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = obj[i]
 *         if not (PyList_Check(v) or np.PyArray_Check(v)):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pandas/lib.pyx":758
 * 
 *     for i in range(n):
 *         v = obj[i]             # <<<<<<<<<<<<<<
 *         if not (PyList_Check(v) or np.PyArray_Check(v)):
 *             all_arrays = 0
 */
    if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/lib.pyx":759
 *     for i in range(n):
 *         v = obj[i]
 *         if not (PyList_Check(v) or np.PyArray_Check(v)):             # <<<<<<<<<<<<<<
 *             all_arrays = 0
 *             break
 */
    __pyx_t_4 = PyList_Check(__pyx_v_v);
    if (!__pyx_t_4) {
      __pyx_t_5 = PyArray_Check(__pyx_v_v);
      __pyx_t_6 = __pyx_t_5;
    } else {
      __pyx_t_6 = __pyx_t_4;
    }
    __pyx_t_4 = (!__pyx_t_6);
    if (__pyx_t_4) {

      /* "pandas/lib.pyx":760
 *         v = obj[i]
 *         if not (PyList_Check(v) or np.PyArray_Check(v)):
 *             all_arrays = 0             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_all_arrays = 0;

      /* "pandas/lib.pyx":761
 *         if not (PyList_Check(v) or np.PyArray_Check(v)):
 *             all_arrays = 0
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if all_arrays:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "pandas/lib.pyx":763
 *             break
 * 
 *     if all_arrays:             # <<<<<<<<<<<<<<
 *         return obj, all_arrays
 * 
 */
  if (__pyx_v_all_arrays) {

    /* "pandas/lib.pyx":764
 * 
 *     if all_arrays:
 *         return obj, all_arrays             # <<<<<<<<<<<<<<
 * 
 *     converted = np.empty(n, dtype=object)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_all_arrays); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_obj));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_obj));
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_r = ((PyObject *)__pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/lib.pyx":766
 *         return obj, all_arrays
 * 
 *     converted = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = obj[i]
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __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[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_converted.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_converted.rcbuffer->pybuffer, (PyObject*)__pyx_v_converted, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      }
    }
    __pyx_pybuffernd_converted.diminfo[0].strides = __pyx_pybuffernd_converted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_converted.diminfo[0].shape = __pyx_pybuffernd_converted.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_10 = 0;
  __pyx_v_converted = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "pandas/lib.pyx":767
 * 
 *     converted = np.empty(n, dtype=object)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = obj[i]
 *         if PyList_Check(v) or np.PyArray_Check(v):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pandas/lib.pyx":768
 *     converted = np.empty(n, dtype=object)
 *     for i in range(n):
 *         v = obj[i]             # <<<<<<<<<<<<<<
 *         if PyList_Check(v) or np.PyArray_Check(v):
 *             converted[i] = tuple(v)
 */
    if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_9 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "pandas/lib.pyx":769
 *     for i in range(n):
 *         v = obj[i]
 *         if PyList_Check(v) or np.PyArray_Check(v):             # <<<<<<<<<<<<<<
 *             converted[i] = tuple(v)
 *         else:
 */
    __pyx_t_4 = PyList_Check(__pyx_v_v);
    if (!__pyx_t_4) {
      __pyx_t_6 = PyArray_Check(__pyx_v_v);
      __pyx_t_5 = __pyx_t_6;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    if (__pyx_t_5) {

      /* "pandas/lib.pyx":770
 *         v = obj[i]
 *         if PyList_Check(v) or np.PyArray_Check(v):
 *             converted[i] = tuple(v)             # <<<<<<<<<<<<<<
 *         else:
 *             converted[i] = v
 */
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_converted.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_converted.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_converted.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_converted.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_16);
      __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_16);
      *__pyx_t_16 = __pyx_t_7;
      __Pyx_GIVEREF(*__pyx_t_16);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "pandas/lib.pyx":772
 *             converted[i] = tuple(v)
 *         else:
 *             converted[i] = v             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(converted), 0
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_converted.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_converted.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_converted.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_converted.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_16);
      __Pyx_INCREF(__pyx_v_v); __Pyx_DECREF(*__pyx_t_16);
      *__pyx_t_16 = __pyx_v_v;
      __Pyx_GIVEREF(*__pyx_t_16);
    }
    __pyx_L9:;
  }

  /* "pandas/lib.pyx":774
 *             converted[i] = v
 * 
 *     return maybe_convert_objects(converted), 0             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(((PyObject *)__pyx_v_converted));
  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_converted));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_converted));
  __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_t_8 = 0;
  __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_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.clean_index_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_converted);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_69max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static char __pyx_doc_6pandas_3lib_68max_len_string_array[] = " return the maximum size of elements in a 1-dim string array ";
static PyMethodDef __pyx_mdef_6pandas_3lib_69max_len_string_array = {__Pyx_NAMESTR("max_len_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_69max_len_string_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_68max_len_string_array)};
static PyObject *__pyx_pw_6pandas_3lib_69max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_len_string_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_68max_len_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":778
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def max_len_string_array(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     """ return the maximum size of elements in a 1-dim string array """
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_68max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  int __pyx_v_i;
  int __pyx_v_m;
  int __pyx_v_l;
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_v_v = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  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;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("max_len_string_array", 0);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":782
 *     cdef:
 *         int i, m, l
 *         length = arr.shape[0]             # <<<<<<<<<<<<<<
 *         object v
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_to_py_Py_intptr_t((__pyx_v_arr->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_length = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/lib.pyx":785
 *         object v
 * 
 *     m = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < length:
 *         v = arr[i]
 */
  __pyx_v_m = 0;

  /* "pandas/lib.pyx":786
 * 
 *     m = 0
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         v = arr[i]
 *         if PyString_Check(v) or PyBytes_Check(v):
 */
  __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_v_length); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "pandas/lib.pyx":787
 *     m = 0
 *     for i from 0 <= i < length:
 *         v = arr[i]             # <<<<<<<<<<<<<<
 *         if PyString_Check(v) or PyBytes_Check(v):
 *             l = len(v)
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/lib.pyx":788
 *     for i from 0 <= i < length:
 *         v = arr[i]
 *         if PyString_Check(v) or PyBytes_Check(v):             # <<<<<<<<<<<<<<
 *             l = len(v)
 * 
 */
    __pyx_t_4 = PyString_Check(__pyx_v_v);
    if (!__pyx_t_4) {
      __pyx_t_5 = PyBytes_Check(__pyx_v_v);
      __pyx_t_6 = __pyx_t_5;
    } else {
      __pyx_t_6 = __pyx_t_4;
    }
    if (__pyx_t_6) {

      /* "pandas/lib.pyx":789
 *         v = arr[i]
 *         if PyString_Check(v) or PyBytes_Check(v):
 *             l = len(v)             # <<<<<<<<<<<<<<
 * 
 *             if l > m:
 */
      __pyx_t_7 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_l = __pyx_t_7;

      /* "pandas/lib.pyx":791
 *             l = len(v)
 * 
 *             if l > m:             # <<<<<<<<<<<<<<
 *                 m = l
 * 
 */
      __pyx_t_6 = (__pyx_v_l > __pyx_v_m);
      if (__pyx_t_6) {

        /* "pandas/lib.pyx":792
 * 
 *             if l > m:
 *                 m = l             # <<<<<<<<<<<<<<
 * 
 *     return m
 */
        __pyx_v_m = __pyx_v_l;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":794
 *                 m = l
 * 
 *     return m             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep[] = " replace the values in the array with replacement if they are nan_rep; return the same array ";
static PyMethodDef __pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep = {__Pyx_NAMESTR("string_array_replace_from_nan_rep"), (PyCFunction)__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep)};
static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_nan_rep = 0;
  PyObject *__pyx_v_replace = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__nan_rep,&__pyx_n_s__replace,0};
    PyObject* values[3] = {0,0,0};

    /* "pandas/lib.pyx":798
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
 *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
 * 
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nan_rep)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__replace);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "string_array_replace_from_nan_rep") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_nan_rep = values[1];
    __pyx_v_replace = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.string_array_replace_from_nan_rep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(__pyx_self, __pyx_v_arr, __pyx_v_nan_rep, __pyx_v_replace);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_nan_rep, PyObject *__pyx_v_replace) {
  int __pyx_v_length;
  int __pyx_v_i;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject **__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep", 0);
  __Pyx_INCREF(__pyx_v_replace);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":801
 *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
 * 
 *     cdef int length = arr.shape[0], i = 0             # <<<<<<<<<<<<<<
 *     if replace is None:
 *         replace = np.nan
 */
  __pyx_v_length = (__pyx_v_arr->dimensions[0]);
  __pyx_v_i = 0;

  /* "pandas/lib.pyx":802
 * 
 *     cdef int length = arr.shape[0], i = 0
 *     if replace is None:             # <<<<<<<<<<<<<<
 *         replace = np.nan
 * 
 */
  __pyx_t_1 = (__pyx_v_replace == Py_None);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":803
 *     cdef int length = arr.shape[0], i = 0
 *     if replace is None:
 *         replace = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < length:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __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[2]; __pyx_lineno = 803; __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_replace);
    __pyx_v_replace = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":805
 *         replace = np.nan
 * 
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         if arr[i] == nan_rep:
 *             arr[i] = replace
 */
  __pyx_t_4 = __pyx_v_length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {

    /* "pandas/lib.pyx":806
 * 
 *     for i from 0 <= i < length:
 *         if arr[i] == nan_rep:             # <<<<<<<<<<<<<<
 *             arr[i] = replace
 * 
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_nan_rep, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __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[2]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/lib.pyx":807
 *     for i from 0 <= i < length:
 *         if arr[i] == nan_rep:
 *             arr[i] = replace             # <<<<<<<<<<<<<<
 * 
 *     return arr
 */
      __pyx_t_6 = __pyx_v_i;
      __pyx_t_7 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_7);
      __Pyx_INCREF(__pyx_v_replace); __Pyx_DECREF(*__pyx_t_7);
      *__pyx_t_7 = __pyx_v_replace;
      __Pyx_GIVEREF(*__pyx_t_7);
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/lib.pyx":809
 *             arr[i] = replace
 * 
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
  __pyx_r = ((PyObject *)__pyx_v_arr);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_73write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_73write_csv_rows = {__Pyx_NAMESTR("write_csv_rows"), (PyCFunction)__pyx_pw_6pandas_3lib_73write_csv_rows, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_73write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_data_index = 0;
  int __pyx_v_nlevels;
  PyObject *__pyx_v_cols = 0;
  PyObject *__pyx_v_writer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_csv_rows (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__data_index,&__pyx_n_s__nlevels,&__pyx_n_s__cols,&__pyx_n_s__writer,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nlevels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cols)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__writer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_csv_rows") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_data = ((PyObject*)values[0]);
    __pyx_v_data_index = ((PyObject*)values[1]);
    __pyx_v_nlevels = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_nlevels == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cols = ((PyObject*)values[3]);
    __pyx_v_writer = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.write_csv_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyList_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data_index), (&PyList_Type), 1, "data_index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cols), (&PyList_Type), 1, "cols", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_72write_csv_rows(__pyx_self, __pyx_v_data, __pyx_v_data_index, __pyx_v_nlevels, __pyx_v_cols, __pyx_v_writer);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":813
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer):             # <<<<<<<<<<<<<<
 * 
 *     cdef int N, j, i, ncols
 */

static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer) {
  int __pyx_v_N;
  int __pyx_v_j;
  int __pyx_v_i;
  int __pyx_v_ncols;
  PyObject *__pyx_v_rows = 0;
  PyObject *__pyx_v_row = NULL;
  CYTHON_UNUSED int __pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write_csv_rows", 0);

  /* "pandas/lib.pyx":820
 * 
 *     # In crude testing, N>100 yields little marginal improvement
 *     N=100             # <<<<<<<<<<<<<<
 * 
 *     # pre-allocate  rows
 */
  __pyx_v_N = 100;

  /* "pandas/lib.pyx":823
 * 
 *     # pre-allocate  rows
 *     ncols = len(cols)             # <<<<<<<<<<<<<<
 *     rows = [[None]*(nlevels+ncols) for x in range(N)]
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_cols) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_cols)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ncols = __pyx_t_1;

  /* "pandas/lib.pyx":824
 *     # pre-allocate  rows
 *     ncols = len(cols)
 *     rows = [[None]*(nlevels+ncols) for x in range(N)]             # <<<<<<<<<<<<<<
 * 
 *     j = -1
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_v_N;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_x = __pyx_t_4;
    __pyx_t_5 = PyList_New(1 * (((__pyx_v_nlevels + __pyx_v_ncols)<0) ? 0:(__pyx_v_nlevels + __pyx_v_ncols))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < (__pyx_v_nlevels + __pyx_v_ncols); __pyx_temp++) {
        __Pyx_INCREF(Py_None);
        PyList_SET_ITEM(__pyx_t_5, __pyx_temp, Py_None);
        __Pyx_GIVEREF(Py_None);
      }
    }
    if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  }
  __pyx_t_5 = ((PyObject *)__pyx_t_2);
  __Pyx_INCREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_rows = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":826
 *     rows = [[None]*(nlevels+ncols) for x in range(N)]
 * 
 *     j = -1             # <<<<<<<<<<<<<<
 *     if nlevels == 1:
 *         for j in range(len(data_index)):
 */
  __pyx_v_j = -1;

  /* "pandas/lib.pyx":827
 * 
 *     j = -1
 *     if nlevels == 1:             # <<<<<<<<<<<<<<
 *         for j in range(len(data_index)):
 *             row = rows[j % N]
 */
  __pyx_t_6 = (__pyx_v_nlevels == 1);
  if (__pyx_t_6) {

    /* "pandas/lib.pyx":828
 *     j = -1
 *     if nlevels == 1:
 *         for j in range(len(data_index)):             # <<<<<<<<<<<<<<
 *             row = rows[j % N]
 *             row[0] = data_index[j]
 */
    if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_data_index)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
      __pyx_v_j = __pyx_t_3;

      /* "pandas/lib.pyx":829
 *     if nlevels == 1:
 *         for j in range(len(data_index)):
 *             row = rows[j % N]             # <<<<<<<<<<<<<<
 *             row[0] = data_index[j]
 *             for i in range(ncols):
 */
      if (unlikely(__pyx_v_N == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N);
      __pyx_t_5 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/lib.pyx":830
 *         for j in range(len(data_index)):
 *             row = rows[j % N]
 *             row[0] = data_index[j]             # <<<<<<<<<<<<<<
 *             for i in range(ncols):
 *                 row[1+i] = data[i][j]
 */
      if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_5 = PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j);
      __Pyx_INCREF(__pyx_t_5);
      if (__Pyx_SetItemInt(__pyx_v_row, 0, __pyx_t_5, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/lib.pyx":831
 *             row = rows[j % N]
 *             row[0] = data_index[j]
 *             for i in range(ncols):             # <<<<<<<<<<<<<<
 *                 row[1+i] = data[i][j]
 * 
 */
      __pyx_t_4 = __pyx_v_ncols;
      for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) {
        __pyx_v_i = __pyx_t_7;

        /* "pandas/lib.pyx":832
 *             row[0] = data_index[j]
 *             for i in range(ncols):
 *                 row[1+i] = data[i][j]             # <<<<<<<<<<<<<<
 * 
 *             if j >= N-1 and j % N == N-1:
 */
        if (unlikely(((PyObject *)__pyx_v_data) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_5 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = (1 + __pyx_v_i);
        if (__Pyx_SetItemInt(__pyx_v_row, __pyx_t_8, __pyx_t_5, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "pandas/lib.pyx":834
 *                 row[1+i] = data[i][j]
 * 
 *             if j >= N-1 and j % N == N-1:             # <<<<<<<<<<<<<<
 *                 writer.writerows(rows)
 *     elif nlevels > 1:
 */
      __pyx_t_6 = (__pyx_v_j >= (__pyx_v_N - 1));
      if (__pyx_t_6) {
        if (unlikely(__pyx_v_N == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_9 = (__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1));
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_6;
      }
      if (__pyx_t_10) {

        /* "pandas/lib.pyx":835
 * 
 *             if j >= N-1 and j % N == N-1:
 *                 writer.writerows(rows)             # <<<<<<<<<<<<<<
 *     elif nlevels > 1:
 *         for j in range(len(data_index)):
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __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[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(((PyObject *)__pyx_v_rows));
        PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_rows));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_rows));
        __pyx_t_11 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
    goto __pyx_L5;
  }

  /* "pandas/lib.pyx":836
 *             if j >= N-1 and j % N == N-1:
 *                 writer.writerows(rows)
 *     elif nlevels > 1:             # <<<<<<<<<<<<<<
 *         for j in range(len(data_index)):
 *             row = rows[j % N]
 */
  __pyx_t_10 = (__pyx_v_nlevels > 1);
  if (__pyx_t_10) {

    /* "pandas/lib.pyx":837
 *                 writer.writerows(rows)
 *     elif nlevels > 1:
 *         for j in range(len(data_index)):             # <<<<<<<<<<<<<<
 *             row = rows[j % N]
 *             row[:nlevels] = list(data_index[j])
 */
    if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_data_index)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
      __pyx_v_j = __pyx_t_3;

      /* "pandas/lib.pyx":838
 *     elif nlevels > 1:
 *         for j in range(len(data_index)):
 *             row = rows[j % N]             # <<<<<<<<<<<<<<
 *             row[:nlevels] = list(data_index[j])
 *             for i in range(ncols):
 */
      if (unlikely(__pyx_v_N == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N);
      __pyx_t_11 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "pandas/lib.pyx":839
 *         for j in range(len(data_index)):
 *             row = rows[j % N]
 *             row[:nlevels] = list(data_index[j])             # <<<<<<<<<<<<<<
 *             for i in range(ncols):
 *                 row[nlevels+i] = data[i][j]
 */
      if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j));
      PyTuple_SET_ITEM(__pyx_t_11, 0, PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j));
      __Pyx_GIVEREF(PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j));
      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      if (__Pyx_PySequence_SetSlice(__pyx_v_row, 0, __pyx_v_nlevels, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/lib.pyx":840
 *             row = rows[j % N]
 *             row[:nlevels] = list(data_index[j])
 *             for i in range(ncols):             # <<<<<<<<<<<<<<
 *                 row[nlevels+i] = data[i][j]
 * 
 */
      __pyx_t_4 = __pyx_v_ncols;
      for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) {
        __pyx_v_i = __pyx_t_7;

        /* "pandas/lib.pyx":841
 *             row[:nlevels] = list(data_index[j])
 *             for i in range(ncols):
 *                 row[nlevels+i] = data[i][j]             # <<<<<<<<<<<<<<
 * 
 *             if j >= N-1 and j % N == N-1:
 */
        if (unlikely(((PyObject *)__pyx_v_data) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = (__pyx_v_nlevels + __pyx_v_i);
        if (__Pyx_SetItemInt(__pyx_v_row, __pyx_t_12, __pyx_t_2, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "pandas/lib.pyx":843
 *                 row[nlevels+i] = data[i][j]
 * 
 *             if j >= N-1 and j % N == N-1:             # <<<<<<<<<<<<<<
 *                 writer.writerows(rows)
 *     else:
 */
      __pyx_t_10 = (__pyx_v_j >= (__pyx_v_N - 1));
      if (__pyx_t_10) {
        if (unlikely(__pyx_v_N == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = (__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1));
        __pyx_t_9 = __pyx_t_6;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      if (__pyx_t_9) {

        /* "pandas/lib.pyx":844
 * 
 *             if j >= N-1 and j % N == N-1:
 *                 writer.writerows(rows)             # <<<<<<<<<<<<<<
 *     else:
 *         for j in range(len(data_index)):
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __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[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(((PyObject *)__pyx_v_rows));
        PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_rows));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_rows));
        __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __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_11)); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/lib.pyx":846
 *                 writer.writerows(rows)
 *     else:
 *         for j in range(len(data_index)):             # <<<<<<<<<<<<<<
 *             row = rows[j % N]
 *             for i in range(ncols):
 */
    if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_data_index)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
      __pyx_v_j = __pyx_t_3;

      /* "pandas/lib.pyx":847
 *     else:
 *         for j in range(len(data_index)):
 *             row = rows[j % N]             # <<<<<<<<<<<<<<
 *             for i in range(ncols):
 *                 row[i] = data[i][j]
 */
      if (unlikely(__pyx_v_N == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N);
      __pyx_t_5 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/lib.pyx":848
 *         for j in range(len(data_index)):
 *             row = rows[j % N]
 *             for i in range(ncols):             # <<<<<<<<<<<<<<
 *                 row[i] = data[i][j]
 * 
 */
      __pyx_t_4 = __pyx_v_ncols;
      for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) {
        __pyx_v_i = __pyx_t_7;

        /* "pandas/lib.pyx":849
 *             row = rows[j % N]
 *             for i in range(ncols):
 *                 row[i] = data[i][j]             # <<<<<<<<<<<<<<
 * 
 *             if j >= N-1 and j % N == N-1:
 */
        if (unlikely(((PyObject *)__pyx_v_data) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_5 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_SetItemInt(__pyx_v_row, __pyx_v_i, __pyx_t_5, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "pandas/lib.pyx":851
 *                 row[i] = data[i][j]
 * 
 *             if j >= N-1 and j % N == N-1:             # <<<<<<<<<<<<<<
 *                 writer.writerows(rows)
 * 
 */
      __pyx_t_9 = (__pyx_v_j >= (__pyx_v_N - 1));
      if (__pyx_t_9) {
        if (unlikely(__pyx_v_N == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_10 = (__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1));
        __pyx_t_6 = __pyx_t_10;
      } else {
        __pyx_t_6 = __pyx_t_9;
      }
      if (__pyx_t_6) {

        /* "pandas/lib.pyx":852
 * 
 *             if j >= N-1 and j % N == N-1:
 *                 writer.writerows(rows)             # <<<<<<<<<<<<<<
 * 
 *     if  j >= 0 and (j < N-1 or (j % N) != N-1 ):
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(((PyObject *)__pyx_v_rows));
        PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_rows));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_rows));
        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __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_11)); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L20;
      }
      __pyx_L20:;
    }
  }
  __pyx_L5:;

  /* "pandas/lib.pyx":854
 *                 writer.writerows(rows)
 * 
 *     if  j >= 0 and (j < N-1 or (j % N) != N-1 ):             # <<<<<<<<<<<<<<
 *         writer.writerows(rows[:((j+1) % N)])
 * 
 */
  __pyx_t_6 = (__pyx_v_j >= 0);
  if (__pyx_t_6) {
    __pyx_t_9 = (__pyx_v_j < (__pyx_v_N - 1));
    if (!__pyx_t_9) {
      if (unlikely(__pyx_v_N == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = (__Pyx_mod_int(__pyx_v_j, __pyx_v_N) != (__pyx_v_N - 1));
      __pyx_t_13 = __pyx_t_10;
    } else {
      __pyx_t_13 = __pyx_t_9;
    }
    __pyx_t_9 = __pyx_t_13;
  } else {
    __pyx_t_9 = __pyx_t_6;
  }
  if (__pyx_t_9) {

    /* "pandas/lib.pyx":855
 * 
 *     if  j >= 0 and (j < N-1 or (j % N) != N-1 ):
 *         writer.writerows(rows[:((j+1) % N)])             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = (__pyx_v_j + 1);
    if (unlikely(__pyx_v_N == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_rows), 0, __Pyx_mod_long(__pyx_t_8, __pyx_v_N)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_11));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
    __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L21;
  }
  __pyx_L21:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pandas.lib.write_csv_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* "pandas/lib.pyx":862
 * @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]);

  /* "pandas/lib.pyx":863
 * 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;

  /* "pandas/lib.pyx":865
 *     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[2]; __pyx_lineno = 865; __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[2]; __pyx_lineno = 865; __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[2]; __pyx_lineno = 865; __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 = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __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[2]; __pyx_lineno = 865; __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[2]; __pyx_lineno = 865; __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[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __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[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":867
 *     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++) {

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

  /* "pandas/lib.pyx":870
 *         result[i] = func(index[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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_77is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_77is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_3lib_77is_lexsorted, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_77is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_lexsorted (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_arrays), (&PyList_Type), 1, "list_of_arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_76is_lexsorted(__pyx_self, ((PyObject*)__pyx_v_list_of_arrays));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":874
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */

static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_nlevels;
  __pyx_t_5numpy_int64_t __pyx_v_k;
  __pyx_t_5numpy_int64_t __pyx_v_cur;
  __pyx_t_5numpy_int64_t __pyx_v_pre;
  PyArrayObject *__pyx_v_arr = 0;
  __pyx_t_5numpy_int64_t **__pyx_v_vecs;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_lexsorted", 0);

  /* "pandas/lib.pyx":881
 *         ndarray arr
 * 
 *     nlevels = len(list_of_arrays)             # <<<<<<<<<<<<<<
 *     n = len(list_of_arrays[0])
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_list_of_arrays)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nlevels = __pyx_t_1;

  /* "pandas/lib.pyx":882
 * 
 *     nlevels = len(list_of_arrays)
 *     n = len(list_of_arrays[0])             # <<<<<<<<<<<<<<
 * 
 *     cdef int64_t **vecs = <int64_t**> malloc(nlevels * sizeof(int64_t*))
 */
  if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":884
 *     n = len(list_of_arrays[0])
 * 
 *     cdef int64_t **vecs = <int64_t**> malloc(nlevels * sizeof(int64_t*))             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < nlevels:
 *         # vecs[i] = <int64_t *> (<ndarray> list_of_arrays[i]).data
 */
  __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_v_nlevels * (sizeof(__pyx_t_5numpy_int64_t *)))));

  /* "pandas/lib.pyx":885
 * 
 *     cdef int64_t **vecs = <int64_t**> malloc(nlevels * sizeof(int64_t*))
 *     for i from 0 <= i < nlevels:             # <<<<<<<<<<<<<<
 *         # vecs[i] = <int64_t *> (<ndarray> list_of_arrays[i]).data
 * 
 */
  __pyx_t_1 = __pyx_v_nlevels;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/lib.pyx":888
 *         # vecs[i] = <int64_t *> (<ndarray> list_of_arrays[i]).data
 * 
 *         arr = list_of_arrays[i]             # <<<<<<<<<<<<<<
 *         vecs[i] = <int64_t *> arr.data
 *     # assume uniqueness??
 */
    if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (!(likely(((PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/lib.pyx":889
 * 
 *         arr = list_of_arrays[i]
 *         vecs[i] = <int64_t *> arr.data             # <<<<<<<<<<<<<<
 *     # assume uniqueness??
 * 
 */
    (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data);
  }

  /* "pandas/lib.pyx":892
 *     # assume uniqueness??
 * 
 *     for i from 1 <= i < n:             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < nlevels:
 *             cur = vecs[k][i]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/lib.pyx":893
 * 
 *     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++) {

      /* "pandas/lib.pyx":894
 *     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]);

      /* "pandas/lib.pyx":895
 *         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)]);

      /* "pandas/lib.pyx":896
 *             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) {

        /* "pandas/lib.pyx":897
 *             pre = vecs[k][i-1]
 *             if cur == pre:
 *                 continue             # <<<<<<<<<<<<<<
 *             elif cur > pre:
 *                 break
 */
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }

      /* "pandas/lib.pyx":898
 *             if cur == pre:
 *                 continue
 *             elif cur > pre:             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_4 = (__pyx_v_cur > __pyx_v_pre);
      if (__pyx_t_4) {

        /* "pandas/lib.pyx":899
 *                 continue
 *             elif cur > pre:
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 return False
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "pandas/lib.pyx":901
 *                 break
 *             else:
 *                 return False             # <<<<<<<<<<<<<<
 *     free(vecs)
 *     return True
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }
      __pyx_L9:;
      __pyx_L7_continue:;
    }
    __pyx_L8_break:;
  }

  /* "pandas/lib.pyx":902
 *             else:
 *                 return False
 *     free(vecs)             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
  free(__pyx_v_vecs);

  /* "pandas/lib.pyx":903
 *                 return False
 *     free(vecs)
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 903; __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.lib.is_lexsorted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_79generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_78generate_bins_dt64[] = "\n    Int64 (datetime64) version of generic python version in groupby.py\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_79generate_bins_dt64 = {__Pyx_NAMESTR("generate_bins_dt64"), (PyCFunction)__pyx_pw_6pandas_3lib_79generate_bins_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_78generate_bins_dt64)};
static PyObject *__pyx_pw_6pandas_3lib_79generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_binner = 0;
  PyObject *__pyx_v_closed = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generate_bins_dt64 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__binner,&__pyx_n_s__closed,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_s__left);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__binner)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("generate_bins_dt64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__closed);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_bins_dt64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_binner = ((PyArrayObject *)values[1]);
    __pyx_v_closed = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("generate_bins_dt64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.generate_bins_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_binner), __pyx_ptype_5numpy_ndarray, 1, "binner", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_78generate_bins_dt64(__pyx_self, __pyx_v_values, __pyx_v_binner, __pyx_v_closed);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":913
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,             # <<<<<<<<<<<<<<
 *                        object closed='left'):
 *     """
 */

static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed) {
  Py_ssize_t __pyx_v_lenidx;
  Py_ssize_t __pyx_v_lenbin;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_bc;
  PyArrayObject *__pyx_v_bins = 0;
  CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_l_bin;
  __pyx_t_5numpy_int64_t __pyx_v_r_bin;
  int __pyx_v_right_closed;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_binner;
  __Pyx_Buffer __pyx_pybuffer_binner;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_bins;
  __Pyx_Buffer __pyx_pybuffer_bins;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  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;
  int __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generate_bins_dt64", 0);
  __pyx_pybuffer_bins.pybuffer.buf = NULL;
  __pyx_pybuffer_bins.refcount = 0;
  __pyx_pybuffernd_bins.data = NULL;
  __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_binner.pybuffer.buf = NULL;
  __pyx_pybuffer_binner.refcount = 0;
  __pyx_pybuffernd_binner.data = NULL;
  __pyx_pybuffernd_binner.rcbuffer = &__pyx_pybuffer_binner;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_binner.rcbuffer->pybuffer, (PyObject*)__pyx_v_binner, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_binner.diminfo[0].strides = __pyx_pybuffernd_binner.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_binner.diminfo[0].shape = __pyx_pybuffernd_binner.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":922
 *         ndarray[int64_t] bins
 *         int64_t l_bin, r_bin
 *         bint right_closed = closed == 'right'             # <<<<<<<<<<<<<<
 * 
 *     lenidx = len(values)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_closed, ((PyObject *)__pyx_n_s__right), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_right_closed = __pyx_t_2;

  /* "pandas/lib.pyx":924
 *         bint right_closed = closed == 'right'
 * 
 *     lenidx = len(values)             # <<<<<<<<<<<<<<
 *     lenbin = len(binner)
 * 
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_lenidx = __pyx_t_3;

  /* "pandas/lib.pyx":925
 * 
 *     lenidx = len(values)
 *     lenbin = len(binner)             # <<<<<<<<<<<<<<
 * 
 *     if lenidx <= 0 or lenbin <= 0:
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_binner)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_lenbin = __pyx_t_3;

  /* "pandas/lib.pyx":927
 *     lenbin = len(binner)
 * 
 *     if lenidx <= 0 or lenbin <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("Invalid length for values or for binner")
 * 
 */
  __pyx_t_2 = (__pyx_v_lenidx <= 0);
  if (!__pyx_t_2) {
    __pyx_t_4 = (__pyx_v_lenbin <= 0);
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  if (__pyx_t_5) {

    /* "pandas/lib.pyx":928
 * 
 *     if lenidx <= 0 or lenbin <= 0:
 *         raise ValueError("Invalid length for values or for binner")             # <<<<<<<<<<<<<<
 * 
 *     # check binner fits data
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":931
 * 
 *     # check binner fits data
 *     if values[0] < binner[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError("Values falls before first bin")
 * 
 */
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_5 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_binner.diminfo[0].strides)));
  if (__pyx_t_5) {

    /* "pandas/lib.pyx":932
 *     # check binner fits data
 *     if values[0] < binner[0]:
 *         raise ValueError("Values falls before first bin")             # <<<<<<<<<<<<<<
 * 
 *     if values[lenidx-1] > binner[lenbin-1]:
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/lib.pyx":934
 *         raise ValueError("Values falls before first bin")
 * 
 *     if values[lenidx-1] > binner[lenbin-1]:             # <<<<<<<<<<<<<<
 *         raise ValueError("Values falls after last bin")
 * 
 */
  __pyx_t_3 = (__pyx_v_lenidx - 1);
  __pyx_t_8 = (__pyx_v_lenbin - 1);
  __pyx_t_5 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_binner.diminfo[0].strides)));
  if (__pyx_t_5) {

    /* "pandas/lib.pyx":935
 * 
 *     if values[lenidx-1] > binner[lenbin-1]:
 *         raise ValueError("Values falls after last bin")             # <<<<<<<<<<<<<<
 * 
 *     bins   = np.empty(lenbin - 1, dtype=np.int64)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/lib.pyx":937
 *         raise ValueError("Values falls after last bin")
 * 
 *     bins   = np.empty(lenbin - 1, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     j  = 0 # index into values
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_lenbin - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_12);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer);
    __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_14 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      }
    }
    __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_13 = 0;
  __pyx_v_bins = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "pandas/lib.pyx":939
 *     bins   = np.empty(lenbin - 1, dtype=np.int64)
 * 
 *     j  = 0 # index into values             # <<<<<<<<<<<<<<
 *     bc = 0 # bin count
 * 
 */
  __pyx_v_j = 0;

  /* "pandas/lib.pyx":940
 * 
 *     j  = 0 # index into values
 *     bc = 0 # bin count             # <<<<<<<<<<<<<<
 * 
 *     # linear scan
 */
  __pyx_v_bc = 0;

  /* "pandas/lib.pyx":943
 * 
 *     # linear scan
 *     for i in range(0, lenbin - 1):             # <<<<<<<<<<<<<<
 *         l_bin = binner[i]
 *         r_bin = binner[i+1]
 */
  __pyx_t_18 = (__pyx_v_lenbin - 1);
  for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
    __pyx_v_i = __pyx_t_19;

    /* "pandas/lib.pyx":944
 *     # linear scan
 *     for i in range(0, lenbin - 1):
 *         l_bin = binner[i]             # <<<<<<<<<<<<<<
 *         r_bin = binner[i+1]
 * 
 */
    __pyx_t_20 = __pyx_v_i;
    __pyx_v_l_bin = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_binner.diminfo[0].strides));

    /* "pandas/lib.pyx":945
 *     for i in range(0, lenbin - 1):
 *         l_bin = binner[i]
 *         r_bin = binner[i+1]             # <<<<<<<<<<<<<<
 * 
 *         # count values in current bin, advance to next bin
 */
    __pyx_t_21 = (__pyx_v_i + 1);
    __pyx_v_r_bin = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_binner.diminfo[0].strides));

    /* "pandas/lib.pyx":948
 * 
 *         # count values in current bin, advance to next bin
 *         while j < lenidx and (values[j] < r_bin or             # <<<<<<<<<<<<<<
 *                               (right_closed and values[j] == r_bin)):
 *             j += 1
 */
    while (1) {
      __pyx_t_5 = (__pyx_v_j < __pyx_v_lenidx);
      if (__pyx_t_5) {
        __pyx_t_22 = __pyx_v_j;
        __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_values.diminfo[0].strides)) < __pyx_v_r_bin);
        if (!__pyx_t_2) {

          /* "pandas/lib.pyx":949
 *         # count values in current bin, advance to next bin
 *         while j < lenidx and (values[j] < r_bin or
 *                               (right_closed and values[j] == r_bin)):             # <<<<<<<<<<<<<<
 *             j += 1
 * 
 */
          if (__pyx_v_right_closed) {
            __pyx_t_23 = __pyx_v_j;
            __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides)) == __pyx_v_r_bin);
            __pyx_t_24 = __pyx_t_4;
          } else {
            __pyx_t_24 = __pyx_v_right_closed;
          }
          __pyx_t_4 = __pyx_t_24;
        } else {
          __pyx_t_4 = __pyx_t_2;
        }
        __pyx_t_2 = __pyx_t_4;
      } else {
        __pyx_t_2 = __pyx_t_5;
      }
      if (!__pyx_t_2) break;

      /* "pandas/lib.pyx":950
 *         while j < lenidx and (values[j] < r_bin or
 *                               (right_closed and values[j] == r_bin)):
 *             j += 1             # <<<<<<<<<<<<<<
 * 
 *         bins[bc] = j
 */
      __pyx_v_j = (__pyx_v_j + 1);
    }

    /* "pandas/lib.pyx":952
 *             j += 1
 * 
 *         bins[bc] = j             # <<<<<<<<<<<<<<
 *         bc += 1
 * 
 */
    __pyx_t_25 = __pyx_v_bc;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_bins.diminfo[0].strides) = __pyx_v_j;

    /* "pandas/lib.pyx":953
 * 
 *         bins[bc] = j
 *         bc += 1             # <<<<<<<<<<<<<<
 * 
 *     return bins
 */
    __pyx_v_bc = (__pyx_v_bc + 1);
  }

  /* "pandas/lib.pyx":955
 *         bc += 1
 * 
 *     return bins             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_bins));
  __pyx_r = ((PyObject *)__pyx_v_bins);
  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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_binner.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.generate_bins_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_binner.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bins);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_81row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_81row_bool_subset = {__Pyx_NAMESTR("row_bool_subset"), (PyCFunction)__pyx_pw_6pandas_3lib_81row_bool_subset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_81row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row_bool_subset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("row_bool_subset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "row_bool_subset") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_bool_subset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.row_bool_subset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __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[2]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_80row_bool_subset(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":962
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def row_bool_subset(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                     ndarray[uint8_t, cast=True] mask):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_pos;
  PyArrayObject *__pyx_v_out = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_uint8_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_bool_subset", 0);
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":965
 *                     ndarray[uint8_t, cast=True] mask):
 *     cdef:
 *         Py_ssize_t i, j, n, k, pos = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t, ndim=2] out
 * 
 */
  __pyx_v_pos = 0;

  /* "pandas/lib.pyx":968
 *         ndarray[float64_t, ndim=2] out
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     assert(n == len(mask))
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_n = __pyx_t_6;
  __pyx_v_k = __pyx_t_7;

  /* "pandas/lib.pyx":969
 * 
 *     n, k = (<object> values).shape
 *     assert(n == len(mask))             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty((mask.sum(), k), dtype=np.float64)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!(__pyx_v_n == __pyx_t_7))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/lib.pyx":971
 *     assert(n == len(mask))
 * 
 *     out = np.empty((mask.sum(), k), dtype=np.float64)             # <<<<<<<<<<<<<<
 * 
 *     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 = 971; __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 = 971; __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_GetAttr(((PyObject *)__pyx_v_mask), __pyx_n_s__sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __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[2]; __pyx_lineno = 971; __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_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/lib.pyx":973
 *     out = np.empty((mask.sum(), k), dtype=np.float64)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             for j in range(k):
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/lib.pyx":974
 * 
 *     for i in range(n):
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             for j in range(k):
 *                 out[pos, j] = values[i, j]
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_15 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_15) {

      /* "pandas/lib.pyx":975
 *     for i in range(n):
 *         if mask[i]:
 *             for j in range(k):             # <<<<<<<<<<<<<<
 *                 out[pos, j] = values[i, j]
 *             pos += 1
 */
      __pyx_t_16 = __pyx_v_k;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_j = __pyx_t_17;

        /* "pandas/lib.pyx":976
 *         if mask[i]:
 *             for j in range(k):
 *                 out[pos, j] = values[i, j]             # <<<<<<<<<<<<<<
 *             pos += 1
 * 
 */
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_19 = __pyx_v_j;
        __pyx_t_20 = __pyx_v_pos;
        __pyx_t_21 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));
      }

      /* "pandas/lib.pyx":977
 *             for j in range(k):
 *                 out[pos, j] = values[i, j]
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
      __pyx_v_pos = (__pyx_v_pos + 1);
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "pandas/lib.pyx":979
 *             pos += 1
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.row_bool_subset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_83row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_83row_bool_subset_object = {__Pyx_NAMESTR("row_bool_subset_object"), (PyCFunction)__pyx_pw_6pandas_3lib_83row_bool_subset_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_83row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row_bool_subset_object (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("row_bool_subset_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "row_bool_subset_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_bool_subset_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.row_bool_subset_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __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[2]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_82row_bool_subset_object(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":983
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def row_bool_subset_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[uint8_t, cast=True] mask):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_pos;
  PyArrayObject *__pyx_v_out = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  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;
  __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;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  PyObject **__pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_bool_subset_object", 0);
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":986
 *                            ndarray[uint8_t, cast=True] mask):
 *     cdef:
 *         Py_ssize_t i, j, n, k, pos = 0             # <<<<<<<<<<<<<<
 *         ndarray[object, ndim=2] out
 * 
 */
  __pyx_v_pos = 0;

  /* "pandas/lib.pyx":989
 *         ndarray[object, ndim=2] out
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     assert(n == len(mask))
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_n = __pyx_t_6;
  __pyx_v_k = __pyx_t_7;

  /* "pandas/lib.pyx":990
 * 
 *     n, k = (<object> values).shape
 *     assert(n == len(mask))             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty((mask.sum(), k), dtype=object)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!(__pyx_v_n == __pyx_t_7))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/lib.pyx":992
 *     assert(n == len(mask))
 * 
 *     out = np.empty((mask.sum(), k), 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 = 992; __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 = 992; __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_GetAttr(((PyObject *)__pyx_v_mask), __pyx_n_s__sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __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[2]; __pyx_lineno = 992; __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_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __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(((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[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/lib.pyx":994
 *     out = np.empty((mask.sum(), k), dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             for j in range(k):
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/lib.pyx":995
 * 
 *     for i in range(n):
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             for j in range(k):
 *                 out[pos, j] = values[i, j]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_14) {

      /* "pandas/lib.pyx":996
 *     for i in range(n):
 *         if mask[i]:
 *             for j in range(k):             # <<<<<<<<<<<<<<
 *                 out[pos, j] = values[i, j]
 *             pos += 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;

        /* "pandas/lib.pyx":997
 *         if mask[i]:
 *             for j in range(k):
 *                 out[pos, j] = values[i, j]             # <<<<<<<<<<<<<<
 *             pos += 1
 * 
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_2 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_2);
        __pyx_t_19 = __pyx_v_pos;
        __pyx_t_20 = __pyx_v_j;
        __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_out.diminfo[1].strides);
        __Pyx_GOTREF(*__pyx_t_21);
        __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_21);
        *__pyx_t_21 = __pyx_t_2;
        __Pyx_GIVEREF(*__pyx_t_21);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "pandas/lib.pyx":998
 *             for j in range(k):
 *                 out[pos, j] = values[i, j]
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
      __pyx_v_pos = (__pyx_v_pos + 1);
      goto __pyx_L7;
    }
    __pyx_L7:;
  }

  /* "pandas/lib.pyx":1000
 *             pos += 1
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.row_bool_subset_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_85group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_85group_count = {__Pyx_NAMESTR("group_count"), (PyCFunction)__pyx_pw_6pandas_3lib_85group_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_85group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_count (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__size,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_count") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __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[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.group_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_84group_count(__pyx_self, __pyx_v_values, __pyx_v_size);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1003
 * 
 * 
 * def group_count(ndarray[int64_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_84group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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_int64_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("group_count", 0);
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":1005
 * def group_count(ndarray[int64_t] values, Py_ssize_t size):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] counts
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1008
 *         ndarray[int64_t] counts
 * 
 *     counts = np.zeros(size, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         counts[values[i]] += 1
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __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 = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __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 = 1008; __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 = 1008; __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 = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/lib.pyx":1009
 * 
 *     counts = np.zeros(size, dtype=np.int64)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         counts[values[i]] += 1
 *     return counts
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/lib.pyx":1010
 *     counts = np.zeros(size, dtype=np.int64)
 *     for i in range(n):
 *         counts[values[i]] += 1             # <<<<<<<<<<<<<<
 *     return counts
 * 
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides));
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;
  }

  /* "pandas/lib.pyx":1011
 *     for i in range(n):
 *         counts[values[i]] += 1
 *     return counts             # <<<<<<<<<<<<<<
 * 
 * def lookup_values(ndarray[object] values, dict mapping):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_v_counts);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_87lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_87lookup_values = {__Pyx_NAMESTR("lookup_values"), (PyCFunction)__pyx_pw_6pandas_3lib_87lookup_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_87lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_mapping = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup_values (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mapping,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapping)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lookup_values") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mapping = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.lookup_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_86lookup_values(__pyx_self, __pyx_v_values, __pyx_v_mapping);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1013
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

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

  /* "pandas/lib.pyx":1015
 * def lookup_values(ndarray[object] values, dict mapping):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype='O')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1017
 *         Py_ssize_t i, n = len(values)
 * 
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         result[i] = mapping[values[i]]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __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 = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __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[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":1018
 * 
 *     result = np.empty(n, dtype='O')
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         result[i] = mapping[values[i]]
 *     return maybe_convert_objects(result)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/lib.pyx":1019
 *     result = np.empty(n, dtype='O')
 *     for i in range(n):
 *         result[i] = mapping[values[i]]             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(result)
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_t_5); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "pandas/lib.pyx":1020
 *     for i in range(n):
 *         result[i] = mapping[values[i]]
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_89count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_89count_level_1d = {__Pyx_NAMESTR("count_level_1d"), (PyCFunction)__pyx_pw_6pandas_3lib_89count_level_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_89count_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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("count_level_1d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_bin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_1d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_mask = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
    __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1024; __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[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __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[2]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_88count_level_1d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1023
 * 
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  __pyx_t_5numpy_uint8_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  __pyx_t_5numpy_int64_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("count_level_1d", 0);
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":1029
 *         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[2]; __pyx_lineno = 1029; __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[2]; __pyx_lineno = 1029; __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[2]; __pyx_lineno = 1029; __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 = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __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[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __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[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/lib.pyx":1031
 *     counts = np.zeros(max_bin, dtype='i8')
 * 
 *     n = len(mask)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "pandas/lib.pyx":1033
 *     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++) {

    /* "pandas/lib.pyx":1034
 * 
 *     for i from 0 <= i < n:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             counts[labels[i]] += 1
 * 
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_12) {

      /* "pandas/lib.pyx":1035
 *     for i from 0 <= i < n:
 *         if mask[i]:
 *             counts[labels[i]] += 1             # <<<<<<<<<<<<<<
 * 
 *     return counts
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides));
      __pyx_t_6 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":1037
 *             counts[labels[i]] += 1
 * 
 *     return counts             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_v_counts);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_91count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_91count_level_2d = {__Pyx_NAMESTR("count_level_2d"), (PyCFunction)__pyx_pw_6pandas_3lib_91count_level_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_91count_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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("count_level_2d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_bin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_2d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_mask = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
    __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1041; __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[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __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[2]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_90count_level_2d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1040
 * 
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_uint8_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_int64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("count_level_2d", 0);
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":1046
 *         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[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_n = __pyx_t_6;
  __pyx_v_k = __pyx_t_7;

  /* "pandas/lib.pyx":1047
 * 
 *     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[2]; __pyx_lineno = 1047; __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 = 1047; __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[2]; __pyx_lineno = 1047; __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[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_counts.diminfo[1].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_counts.diminfo[1].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/lib.pyx":1049
 *     counts = np.zeros((max_bin, k), dtype='i8')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < k:
 *             if mask[i, j]:
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {

    /* "pandas/lib.pyx":1050
 * 
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *             if mask[i, j]:
 *                 counts[labels[i], j] += 1
 */
    __pyx_t_6 = __pyx_v_k;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) {

      /* "pandas/lib.pyx":1051
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < k:
 *             if mask[i, j]:             # <<<<<<<<<<<<<<
 *                 counts[labels[i], j] += 1
 * 
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_9 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_mask.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_9 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_mask.diminfo[1].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_9 = 1;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_15) {

        /* "pandas/lib.pyx":1052
 *         for j from 0 <= j < k:
 *             if mask[i, j]:
 *                 counts[labels[i], j] += 1             # <<<<<<<<<<<<<<
 * 
 *     return counts
 */
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_17 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides));
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_9 = -1;
        if (__pyx_t_17 < 0) {
          __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
          if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_9 = 0;
        if (__pyx_t_18 < 0) {
          __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[1].shape;
          if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1;
        } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[1].shape)) __pyx_t_9 = 1;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[1].strides) += 1;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
  }

  /* "pandas/lib.pyx":1054
 *                 counts[labels[i], j] += 1
 * 
 *     return counts             # <<<<<<<<<<<<<<
 * 
 * cdef class _PandasNull:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_v_counts);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_3lib__PandasNull, 1, "self", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(((struct __pyx_obj_6pandas_3lib__PandasNull *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1058
 * cdef class _PandasNull:
 * 
 *     def __richcmp__(_PandasNull self, object other, int op):             # <<<<<<<<<<<<<<
 *         if op == 2: # ==
 *             return isinstance(other, _PandasNull)
 */

static PyObject *__pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "pandas/lib.pyx":1061
 *         if op == 2: # ==
 *             return isinstance(other, _PandasNull)
 *         elif op == 3: # !=             # <<<<<<<<<<<<<<
 *             return not isinstance(other, _PandasNull)
 *         else:
 */
  switch (__pyx_v_op) {

    /* "pandas/lib.pyx":1059
 * 
 *     def __richcmp__(_PandasNull self, object other, int op):
 *         if op == 2: # ==             # <<<<<<<<<<<<<<
 *             return isinstance(other, _PandasNull)
 *         elif op == 3: # !=
 */
    case 2:

    /* "pandas/lib.pyx":1060
 *     def __richcmp__(_PandasNull self, object other, int op):
 *         if op == 2: # ==
 *             return isinstance(other, _PandasNull)             # <<<<<<<<<<<<<<
 *         elif op == 3: # !=
 *             return not isinstance(other, _PandasNull)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;

    /* "pandas/lib.pyx":1061
 *         if op == 2: # ==
 *             return isinstance(other, _PandasNull)
 *         elif op == 3: # !=             # <<<<<<<<<<<<<<
 *             return not isinstance(other, _PandasNull)
 *         else:
 */
    case 3:

    /* "pandas/lib.pyx":1062
 *             return isinstance(other, _PandasNull)
 *         elif op == 3: # !=
 *             return not isinstance(other, _PandasNull)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
    default:

    /* "pandas/lib.pyx":1064
 *             return not isinstance(other, _PandasNull)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
  }

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

/* Python wrapper */
static Py_hash_t __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(((struct __pyx_obj_6pandas_3lib__PandasNull *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1066
 *             return False
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */

static Py_hash_t __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pandas/lib.pyx":1067
 * 
 *     def __hash__(self):
 *         return 0             # <<<<<<<<<<<<<<
 * 
 * pandas_null = _PandasNull()
 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_93fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_92fast_zip_fillna[] = "\n    For zipping multiple ndarrays into an ndarray of tuples\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_93fast_zip_fillna = {__Pyx_NAMESTR("fast_zip_fillna"), (PyCFunction)__pyx_pw_6pandas_3lib_93fast_zip_fillna, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_92fast_zip_fillna)};
static PyObject *__pyx_pw_6pandas_3lib_93fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ndarrays = 0;
  PyObject *__pyx_v_fill_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_zip_fillna (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ndarrays,&__pyx_n_s__fill_value,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_19;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ndarrays)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_zip_fillna") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ndarrays = ((PyObject*)values[0]);
    __pyx_v_fill_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fast_zip_fillna", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.fast_zip_fillna", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ndarrays), (&PyList_Type), 1, "ndarrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_92fast_zip_fillna(__pyx_self, __pyx_v_ndarrays, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1071
 * pandas_null = _PandasNull()
 * 
 * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */

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

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

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

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

  /* "pandas/lib.pyx":1087
 * 
 *     # initialize tuples on first pass
 *     arr = ndarrays[0]             # <<<<<<<<<<<<<<
 *     it = <flatiter> PyArray_IterNew(arr)
 *     for i in range(n):
 */
  if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __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 = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_arr = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":1088
 *     # 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 = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2);
  __pyx_t_2 = 0;

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

    /* "pandas/lib.pyx":1090
 *     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 = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_v_arr;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_2), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

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

    /* "pandas/lib.pyx":1093
 *         tup = PyTuple_New(k)
 * 
 *         if val != val:             # <<<<<<<<<<<<<<
 *             val = fill_value
 * 
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_12) {

      /* "pandas/lib.pyx":1094
 * 
 *         if val != val:
 *             val = fill_value             # <<<<<<<<<<<<<<
 * 
 *         PyTuple_SET_ITEM(tup, 0, val)
 */
      __Pyx_INCREF(__pyx_v_fill_value);
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_v_fill_value;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/lib.pyx":1096
 *             val = fill_value
 * 
 *         PyTuple_SET_ITEM(tup, 0, val)             # <<<<<<<<<<<<<<
 *         Py_INCREF(val)
 *         result[i] = tup
 */
    PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val);

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

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

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

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

    /* "pandas/lib.pyx":1102
 * 
 *     for j in range(1, k):
 *         arr = ndarrays[j]             # <<<<<<<<<<<<<<
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 */
    if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __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/lib.pyx":1103
 *     for j in range(1, k):
 *         arr = ndarrays[j]
 *         it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *         if len(arr) != n:
 *             raise ValueError('all arrays must be same length')
 */
    __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_it));
    __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2);
    __pyx_t_2 = 0;

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

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

    /* "pandas/lib.pyx":1107
 *             raise ValueError('all arrays must be same length')
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *             if val != val:
 */
    __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;

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

      /* "pandas/lib.pyx":1109
 *         for i in range(n):
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *             if val != val:             # <<<<<<<<<<<<<<
 *                 val = fill_value
 * 
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_12) {

        /* "pandas/lib.pyx":1110
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *             if val != val:
 *                 val = fill_value             # <<<<<<<<<<<<<<
 * 
 *             PyTuple_SET_ITEM(result[i], j, val)
 */
        __Pyx_INCREF(__pyx_v_fill_value);
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_v_fill_value;
        goto __pyx_L11;
      }
      __pyx_L11:;

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

      /* "pandas/lib.pyx":1113
 * 
 *             PyTuple_SET_ITEM(result[i], j, val)
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyArray_ITER_NEXT(it)
 * 
 */
      Py_INCREF(__pyx_v_val);

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

  /* "pandas/lib.pyx":1116
 *             PyArray_ITER_NEXT(it)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def duplicated(ndarray[object] values, take_last=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_95duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pw_6pandas_3lib_95duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_take_last = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("duplicated (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__take_last,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_21;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__take_last);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "duplicated") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_take_last = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("duplicated", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.duplicated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_94duplicated(__pyx_self, __pyx_v_values, __pyx_v_take_last);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1118
 *     return result
 * 
 * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seen = 0;
  PyObject *__pyx_v_row = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("duplicated", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":1121
 *     cdef:
 *         Py_ssize_t i, n
 *         dict seen = {}             # <<<<<<<<<<<<<<
 *         object row
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_seen = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/lib.pyx":1124
 *         object row
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)
 * 
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/lib.pyx":1125
 * 
 *     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[2]; __pyx_lineno = 1125; __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 = 1125; __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 = 1125; __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 = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __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 = 1125; __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 = 1125; __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 = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __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 = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/lib.pyx":1127
 *     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[2]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {

    /* "pandas/lib.pyx":1128
 * 
 *     if take_last:
 *         for i from n > i >= 0:             # <<<<<<<<<<<<<<
 *             row = values[i]
 * 
 */
    for (__pyx_v_i = __pyx_v_n-1; __pyx_v_i >= 0; __pyx_v_i--) {

      /* "pandas/lib.pyx":1129
 *     if take_last:
 *         for i from n > i >= 0:
 *             row = values[i]             # <<<<<<<<<<<<<<
 * 
 *             if row in seen:
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_2 < 0) {
        __pyx_t_2 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_2 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/lib.pyx":1131
 *             row = values[i]
 * 
 *             if row in seen:             # <<<<<<<<<<<<<<
 *                 result[i] = 1
 *             else:
 */
      __pyx_t_8 = (__Pyx_PyDict_Contains(__pyx_v_row, ((PyObject *)__pyx_v_seen), Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

        /* "pandas/lib.pyx":1132
 * 
 *             if row in seen:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen[row] = None
 */
        __pyx_t_10 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_10 < 0) {
          __pyx_t_10 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_10 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "pandas/lib.pyx":1134
 *                 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[2]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/lib.pyx":1135
 *             else:
 *                 seen[row] = None
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 *     else:
 *         for i from 0 <= i < n:
 */
        __pyx_t_11 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_11 < 0) {
          __pyx_t_11 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      }
      __pyx_L6:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/lib.pyx":1137
 *                 result[i] = 0
 *     else:
 *         for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *             row = values[i]
 *             if row in seen:
 */
    __pyx_t_12 = __pyx_v_n;
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) {

      /* "pandas/lib.pyx":1138
 *     else:
 *         for i from 0 <= i < n:
 *             row = values[i]             # <<<<<<<<<<<<<<
 *             if row in seen:
 *                 result[i] = 1
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/lib.pyx":1139
 *         for i from 0 <= i < n:
 *             row = values[i]
 *             if row in seen:             # <<<<<<<<<<<<<<
 *                 result[i] = 1
 *             else:
 */
      __pyx_t_8 = (__Pyx_PyDict_Contains(__pyx_v_row, ((PyObject *)__pyx_v_seen), Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

        /* "pandas/lib.pyx":1140
 *             row = values[i]
 *             if row in seen:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen[row] = None
 */
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_14 < 0) {
          __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "pandas/lib.pyx":1142
 *                 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[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/lib.pyx":1143
 *             else:
 *                 seen[row] = None
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      }
      __pyx_L9:;
    }
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":1145
 *                 result[i] = 0
 * 
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):
 */
  __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 = 1145; __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 = 1145; __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 = 1145; __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 = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_97generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pw_6pandas_3lib_97generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_ngroups;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generate_slices (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__labels,&__pyx_n_s__ngroups,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_slices") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_labels = ((PyArrayObject *)values[0]);
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __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[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_96generate_slices(__pyx_self, __pyx_v_labels, __pyx_v_ngroups);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1147
 *     return result.view(np.bool_)
 * 
 * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, group_size, n, lab, start
 */

static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_group_size;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_lab;
  Py_ssize_t __pyx_v_start;
  PyArrayObject *__pyx_v_starts = 0;
  PyObject *__pyx_v_ends = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_starts;
  __Pyx_Buffer __pyx_pybuffer_starts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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;
  int __pyx_t_16;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generate_slices", 0);
  __pyx_pybuffer_starts.pybuffer.buf = NULL;
  __pyx_pybuffer_starts.refcount = 0;
  __pyx_pybuffernd_starts.data = NULL;
  __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":1153
 *         ndarray[int64_t] starts
 * 
 *     n = len(labels)             # <<<<<<<<<<<<<<
 * 
 *     starts = np.zeros(ngroups, dtype=np.int64)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1155
 *     n = len(labels)
 * 
 *     starts = np.zeros(ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     ends = np.zeros(ngroups, dtype=np.int64)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __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 = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __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 = 1155; __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 = 1155; __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 = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_starts = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/lib.pyx":1156
 * 
 *     starts = np.zeros(ngroups, dtype=np.int64)
 *     ends = np.zeros(ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     start = 0
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __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[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __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[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __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[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_v_ends = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":1158
 *     ends = np.zeros(ngroups, dtype=np.int64)
 * 
 *     start = 0             # <<<<<<<<<<<<<<
 *     group_size = 0
 *     for i in range(n):
 */
  __pyx_v_start = 0;

  /* "pandas/lib.pyx":1159
 * 
 *     start = 0
 *     group_size = 0             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         group_size += 1
 */
  __pyx_v_group_size = 0;

  /* "pandas/lib.pyx":1160
 *     start = 0
 *     group_size = 0
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         group_size += 1
 *         lab = labels[i]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/lib.pyx":1161
 *     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);

    /* "pandas/lib.pyx":1162
 *     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_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides));

    /* "pandas/lib.pyx":1163
 *         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_14 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_14) {
      __pyx_t_15 = (__pyx_v_i + 1);
      __pyx_t_8 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = (__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides)));
      __pyx_t_17 = __pyx_t_16;
    } else {
      __pyx_t_17 = __pyx_t_14;
    }
    if (__pyx_t_17) {

      /* "pandas/lib.pyx":1164
 *         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_18 = __pyx_v_lab;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_starts.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_starts.diminfo[0].strides) = __pyx_v_start;

      /* "pandas/lib.pyx":1165
 *         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_5 = PyInt_FromSsize_t((__pyx_v_start + __pyx_v_group_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemInt(__pyx_v_ends, __pyx_v_lab, __pyx_t_5, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/lib.pyx":1166
 *             starts[lab] = start
 *             ends[lab] = start + group_size
 *             start += group_size             # <<<<<<<<<<<<<<
 *             group_size = 0
 * 
 */
      __pyx_v_start = (__pyx_v_start + __pyx_v_group_size);

      /* "pandas/lib.pyx":1167
 *             ends[lab] = start + group_size
 *             start += group_size
 *             group_size = 0             # <<<<<<<<<<<<<<
 * 
 *     return starts, ends
 */
      __pyx_v_group_size = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":1169
 *             group_size = 0
 * 
 *     return starts, ends             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_starts));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_starts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_starts));
  __Pyx_INCREF(__pyx_v_ends);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ends);
  __Pyx_GIVEREF(__pyx_v_ends);
  __pyx_r = ((PyObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_99indices_fast = {__Pyx_NAMESTR("indices_fast"), (PyCFunction)__pyx_pw_6pandas_3lib_99indices_fast, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_keys = 0;
  PyObject *__pyx_v_sorted_labels = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("indices_fast (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,&__pyx_n_s__keys,&__pyx_n_s__sorted_labels,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sorted_labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "indices_fast") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_index = values[0];
    __pyx_v_labels = ((PyArrayObject *)values[1]);
    __pyx_v_keys = ((PyObject*)values[2]);
    __pyx_v_sorted_labels = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sorted_labels), (&PyList_Type), 1, "sorted_labels", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_98indices_fast(__pyx_self, __pyx_v_index, __pyx_v_labels, __pyx_v_keys, __pyx_v_sorted_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":1172
 * 
 * 
 * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
 *                  list sorted_labels):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_lab;
  Py_ssize_t __pyx_v_cur;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_v_val = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  long __pyx_t_4;
  int __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;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("indices_fast", 0);
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":1175
 *                  list sorted_labels):
 *     cdef:
 *         Py_ssize_t i, j, k, lab, cur, start, n = len(labels)             # <<<<<<<<<<<<<<
 *         dict result = {}
 *         object tup
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1176
 *     cdef:
 *         Py_ssize_t i, j, k, lab, cur, start, n = len(labels)
 *         dict result = {}             # <<<<<<<<<<<<<<
 *         object tup
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1179
 *         object tup
 * 
 *     k = len(keys)             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  if (unlikely(((PyObject *)__pyx_v_keys) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "pandas/lib.pyx":1181
 *     k = len(keys)
 * 
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_3 = (__pyx_v_n == 0);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":1182
 * 
 *     if n == 0:
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     start = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":1184
 *         return result
 * 
 *     start = 0             # <<<<<<<<<<<<<<
 *     cur = labels[0]
 *     for i in range(1, n):
 */
  __pyx_v_start = 0;

  /* "pandas/lib.pyx":1185
 * 
 *     start = 0
 *     cur = labels[0]             # <<<<<<<<<<<<<<
 *     for i in range(1, n):
 *         lab = labels[i]
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_pybuffernd_labels.diminfo[0].shape;
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_labels.diminfo[0].strides));

  /* "pandas/lib.pyx":1186
 *     start = 0
 *     cur = labels[0]
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         lab = labels[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/lib.pyx":1187
 *     cur = labels[0]
 *     for i in range(1, n):
 *         lab = labels[i]             # <<<<<<<<<<<<<<
 * 
 *         if lab != cur:
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_labels.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_labels.diminfo[0].strides));

    /* "pandas/lib.pyx":1189
 *         lab = labels[i]
 * 
 *         if lab != cur:             # <<<<<<<<<<<<<<
 *             if lab != -1:
 *                 tup = PyTuple_New(k)
 */
    __pyx_t_3 = (__pyx_v_lab != __pyx_v_cur);
    if (__pyx_t_3) {

      /* "pandas/lib.pyx":1190
 * 
 *         if lab != cur:
 *             if lab != -1:             # <<<<<<<<<<<<<<
 *                 tup = PyTuple_New(k)
 *                 for j in range(k):
 */
      __pyx_t_3 = (__pyx_v_lab != -1);
      if (__pyx_t_3) {

        /* "pandas/lib.pyx":1191
 *         if lab != cur:
 *             if lab != -1:
 *                 tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
 *                 for j in range(k):
 *                     val = util.get_value_at(keys[j],
 */
        __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF(__pyx_v_tup);
        __pyx_v_tup = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pandas/lib.pyx":1192
 *             if lab != -1:
 *                 tup = PyTuple_New(k)
 *                 for j in range(k):             # <<<<<<<<<<<<<<
 *                     val = util.get_value_at(keys[j],
 *                                             sorted_labels[j][i-1])
 */
        __pyx_t_8 = __pyx_v_k;
        for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
          __pyx_v_j = __pyx_t_9;

          /* "pandas/lib.pyx":1193
 *                 tup = PyTuple_New(k)
 *                 for j in range(k):
 *                     val = util.get_value_at(keys[j],             # <<<<<<<<<<<<<<
 *                                             sorted_labels[j][i-1])
 *                     PyTuple_SET_ITEM(tup, j, val)
 */
          if (unlikely(((PyObject *)__pyx_v_keys) == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_keys), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __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[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "pandas/lib.pyx":1194
 *                 for j in range(k):
 *                     val = util.get_value_at(keys[j],
 *                                             sorted_labels[j][i-1])             # <<<<<<<<<<<<<<
 *                     PyTuple_SET_ITEM(tup, j, val)
 *                     Py_INCREF(val)
 */
          if (unlikely(((PyObject *)__pyx_v_sorted_labels) == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_10 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_sorted_labels), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = (__pyx_v_i - 1);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_10, __pyx_t_11, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_12) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_2), __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_10;
          __pyx_t_10 = 0;

          /* "pandas/lib.pyx":1195
 *                     val = util.get_value_at(keys[j],
 *                                             sorted_labels[j][i-1])
 *                     PyTuple_SET_ITEM(tup, j, val)             # <<<<<<<<<<<<<<
 *                     Py_INCREF(val)
 * 
 */
          PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val);

          /* "pandas/lib.pyx":1196
 *                                             sorted_labels[j][i-1])
 *                     PyTuple_SET_ITEM(tup, j, val)
 *                     Py_INCREF(val)             # <<<<<<<<<<<<<<
 * 
 *                 result[tup] = index[start:i]
 */
          Py_INCREF(__pyx_v_val);
        }

        /* "pandas/lib.pyx":1198
 *                     Py_INCREF(val)
 * 
 *                 result[tup] = index[start:i]             # <<<<<<<<<<<<<<
 *             start = i
 *         cur = lab
 */
        __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_index, __pyx_v_start, __pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_tup, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "pandas/lib.pyx":1199
 * 
 *                 result[tup] = index[start:i]
 *             start = i             # <<<<<<<<<<<<<<
 *         cur = lab
 * 
 */
      __pyx_v_start = __pyx_v_i;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/lib.pyx":1200
 *                 result[tup] = index[start:i]
 *             start = i
 *         cur = lab             # <<<<<<<<<<<<<<
 * 
 *     tup = PyTuple_New(k)
 */
    __pyx_v_cur = __pyx_v_lab;
  }

  /* "pandas/lib.pyx":1202
 *         cur = lab
 * 
 *     tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
 *     for j in range(k):
 *         val = util.get_value_at(keys[j],
 */
  __pyx_t_10 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_v_tup);
  __pyx_v_tup = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "pandas/lib.pyx":1203
 * 
 *     tup = PyTuple_New(k)
 *     for j in range(k):             # <<<<<<<<<<<<<<
 *         val = util.get_value_at(keys[j],
 *                                 sorted_labels[j][n - 1])
 */
  __pyx_t_1 = __pyx_v_k;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "pandas/lib.pyx":1204
 *     tup = PyTuple_New(k)
 *     for j in range(k):
 *         val = util.get_value_at(keys[j],             # <<<<<<<<<<<<<<
 *                                 sorted_labels[j][n - 1])
 *         PyTuple_SET_ITEM(tup, j, val)
 */
    if (unlikely(((PyObject *)__pyx_v_keys) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_10 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_keys), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pandas/lib.pyx":1205
 *     for j in range(k):
 *         val = util.get_value_at(keys[j],
 *                                 sorted_labels[j][n - 1])             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(tup, j, val)
 *         Py_INCREF(val)
 */
    if (unlikely(((PyObject *)__pyx_v_sorted_labels) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_sorted_labels), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_12) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_8 = (__pyx_v_n - 1);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_10), __pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "pandas/lib.pyx":1206
 *         val = util.get_value_at(keys[j],
 *                                 sorted_labels[j][n - 1])
 *         PyTuple_SET_ITEM(tup, j, val)             # <<<<<<<<<<<<<<
 *         Py_INCREF(val)
 *     result[tup] = index[start:]
 */
    PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val);

    /* "pandas/lib.pyx":1207
 *                                 sorted_labels[j][n - 1])
 *         PyTuple_SET_ITEM(tup, j, val)
 *         Py_INCREF(val)             # <<<<<<<<<<<<<<
 *     result[tup] = index[start:]
 * 
 */
    Py_INCREF(__pyx_v_val);
  }

  /* "pandas/lib.pyx":1208
 *         PyTuple_SET_ITEM(tup, j, val)
 *         Py_INCREF(val)
 *     result[tup] = index[start:]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_t_12 = __Pyx_PySequence_GetSlice(__pyx_v_index, __pyx_v_start, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_tup, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pandas/lib.pyx":1210
 *     result[tup] = index[start:]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * include "reduce.pyx"
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_axis = 0;
  PyObject *__pyx_v_dummy = 0;
  PyObject *__pyx_v_labels = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,&__pyx_n_s__labels,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_1);

    /* "pandas/src/reduce.pyx":18
 *         object arr, dummy, f, labels, typ, index
 * 
 *     def __init__(self, object arr, object f, axis=1, dummy=None,             # <<<<<<<<<<<<<<
 *                  labels=None):
 *         n, k = arr.shape
 */
    values[3] = ((PyObject *)Py_None);

    /* "pandas/src/reduce.pyx":19
 * 
 *     def __init__(self, object arr, object f, axis=1, dummy=None,
 *                  labels=None):             # <<<<<<<<<<<<<<
 *         n, k = arr.shape
 * 
 */
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __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--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_f = values[1];
    __pyx_v_axis = values[2];
    __pyx_v_dummy = values[3];
    __pyx_v_labels = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_7Reducer___init__(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy, __pyx_v_labels);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":18
 *         object arr, dummy, f, labels, typ, index
 * 
 *     def __init__(self, object arr, object f, axis=1, dummy=None,             # <<<<<<<<<<<<<<
 *                  labels=None):
 *         n, k = arr.shape
 */

static int __pyx_pf_6pandas_3lib_7Reducer___init__(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_index = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_arr);

  /* "pandas/src/reduce.pyx":20
 *     def __init__(self, object arr, object f, axis=1, dummy=None,
 *                  labels=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[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/reduce.pyx":22
 *         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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/reduce.pyx":23
 * 
 *         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[0]; __pyx_lineno = 23; __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[0]; __pyx_lineno = 23; __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[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_6);
    if (__pyx_t_7) {

      /* "pandas/src/reduce.pyx":24
 *         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[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_arr);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/src/reduce.pyx":26
 *                 arr = arr.copy('F')
 * 
 *             self.nresults = k             # <<<<<<<<<<<<<<
 *             self.chunksize = n
 *             self.increment = n * arr.dtype.itemsize
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->nresults = __pyx_t_8;

    /* "pandas/src/reduce.pyx":27
 * 
 *             self.nresults = k
 *             self.chunksize = n             # <<<<<<<<<<<<<<
 *             self.increment = n * arr.dtype.itemsize
 *         else:
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->chunksize = __pyx_t_8;

    /* "pandas/src/reduce.pyx":28
 *             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[0]; __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__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __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 = PyNumber_Multiply(__pyx_v_n, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->increment = __pyx_t_8;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":30
 *             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[0]; __pyx_lineno = 30; __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[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = (!__pyx_t_7);
    if (__pyx_t_6) {

      /* "pandas/src/reduce.pyx":31
 *         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[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_23), NULL); 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_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:;

    /* "pandas/src/reduce.pyx":33
 *                 arr = arr.copy('C')
 * 
 *             self.nresults = n             # <<<<<<<<<<<<<<
 *             self.chunksize = k
 *             self.increment = k * arr.dtype.itemsize
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->nresults = __pyx_t_8;

    /* "pandas/src/reduce.pyx":34
 * 
 *             self.nresults = n
 *             self.chunksize = k             # <<<<<<<<<<<<<<
 *             self.increment = k * arr.dtype.itemsize
 * 
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->chunksize = __pyx_t_8;

    /* "pandas/src/reduce.pyx":35
 *             self.nresults = n
 *             self.chunksize = k
 *             self.increment = k * arr.dtype.itemsize             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __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[0]; __pyx_lineno = 35; __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[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->increment = __pyx_t_8;
  }
  __pyx_L5:;

  /* "pandas/src/reduce.pyx":38
 * 
 * 
 *         self.f = f             # <<<<<<<<<<<<<<
 *         self.arr = arr
 *         self.typ = None
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "pandas/src/reduce.pyx":39
 * 
 *         self.f = f
 *         self.arr = arr             # <<<<<<<<<<<<<<
 *         self.typ = None
 *         self.labels = labels
 */
  __Pyx_INCREF(__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_arr;

  /* "pandas/src/reduce.pyx":40
 *         self.f = f
 *         self.arr = arr
 *         self.typ = None             # <<<<<<<<<<<<<<
 *         self.labels = labels
 *         self.dummy, index = self._check_dummy(dummy=dummy)
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = Py_None;

  /* "pandas/src/reduce.pyx":41
 *         self.arr = arr
 *         self.typ = None
 *         self.labels = labels             # <<<<<<<<<<<<<<
 *         self.dummy, index = self._check_dummy(dummy=dummy)
 * 
 */
  __Pyx_INCREF(__pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_labels;

  /* "pandas/src/reduce.pyx":42
 *         self.typ = None
 *         self.labels = labels
 *         self.dummy, index = self._check_dummy(dummy=dummy)             # <<<<<<<<<<<<<<
 * 
 *         self.labels = labels
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __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 = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dummy), __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L9_unpacking_done;
    __pyx_L8_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L9_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":44
 *         self.dummy, index = self._check_dummy(dummy=dummy)
 * 
 *         self.labels = labels             # <<<<<<<<<<<<<<
 *         self.index  = index
 * 
 */
  __Pyx_INCREF(__pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_labels;

  /* "pandas/src/reduce.pyx":45
 * 
 *         self.labels = labels
 *         self.index  = index             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
  __Pyx_INCREF(__pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_v_index;

  __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.lib.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
    PyObject* values[1] = {0};

    /* "pandas/src/reduce.pyx":47
 *         self.index  = index
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         cdef object index
 * 
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dummy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_dummy", 0);
  __Pyx_INCREF(__pyx_v_dummy);

  /* "pandas/src/reduce.pyx":50
 *         cdef object index
 * 
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 *             index = None
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  if (__pyx_t_1) {

    /* "pandas/src/reduce.pyx":51
 * 
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *             index = None
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __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[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __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;

    /* "pandas/src/reduce.pyx":52
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 *             index = None             # <<<<<<<<<<<<<<
 * 
 *             # our ref is stolen later since we are creating this array
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_index = Py_None;

    /* "pandas/src/reduce.pyx":56
 *             # our ref is stolen later since we are creating this array
 *             # in cython, so increment first
 *             Py_INCREF(dummy)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    Py_INCREF(__pyx_v_dummy);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":58
 *             Py_INCREF(dummy)
 *         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[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __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); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __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[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":59
 *         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_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/reduce.pyx":60
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             if len(dummy) != self.chunksize:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be length %d' %
 *                                  self.chunksize)
 */
    __pyx_t_6 = PyObject_Length(__pyx_v_dummy); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_6 != __pyx_v_self->chunksize);
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":62
 *             if len(dummy) != self.chunksize:
 *                 raise ValueError('Dummy array must be length %d' %
 *                                  self.chunksize)             # <<<<<<<<<<<<<<
 * 
 *             # we passed a series-like
 */
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_26), __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __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[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/src/reduce.pyx":65
 * 
 *             # we passed a series-like
 *             if hasattr(dummy,'values'):             # <<<<<<<<<<<<<<
 * 
 *                 self.typ = type(dummy)
 */
    __pyx_t_2 = ((PyObject *)__pyx_n_s__values);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = PyObject_HasAttr(__pyx_v_dummy, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":67
 *             if hasattr(dummy,'values'):
 * 
 *                 self.typ = type(dummy)             # <<<<<<<<<<<<<<
 *                 index = getattr(dummy,'index',None)
 *                 dummy = dummy.values
 */
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dummy)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_dummy)));
      __Pyx_GOTREF(__pyx_v_self->typ);
      __Pyx_DECREF(__pyx_v_self->typ);
      __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_dummy));

      /* "pandas/src/reduce.pyx":68
 * 
 *                 self.typ = type(dummy)
 *                 index = getattr(dummy,'index',None)             # <<<<<<<<<<<<<<
 *                 dummy = dummy.values
 * 
 */
      __pyx_t_2 = ((PyObject *)__pyx_n_s__index);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = Py_None;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetAttr3(__pyx_v_dummy, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __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_4); __pyx_t_4 = 0;
      __pyx_v_index = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/src/reduce.pyx":69
 *                 self.typ = type(dummy)
 *                 index = getattr(dummy,'index',None)
 *                 dummy = dummy.values             # <<<<<<<<<<<<<<
 * 
 *         return dummy, index
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_v_dummy);
      __pyx_v_dummy = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":71
 *                 dummy = dummy.values
 * 
 *         return dummy, index             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_index)) { __Pyx_RaiseUnboundLocalError("index"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __Pyx_INCREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  __pyx_r = ((PyObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_result (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_4get_result(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":73
 *         return dummy, index
 * 
 *     def get_result(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             char* dummy_buf
 */

static PyObject *__pyx_pf_6pandas_3lib_7Reducer_4get_result(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self) {
  char *__pyx_v_dummy_buf;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_chunk = 0;
  Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_incr;
  PyArrayIterObject *__pyx_v_it = 0;
  PyObject *__pyx_v_res = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_cached_typ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  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;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result", 0);

  /* "pandas/src/reduce.pyx":80
 *             flatiter it
 *             object res, name, labels, index
 *             object cached_typ = None             # <<<<<<<<<<<<<<
 * 
 *         arr = self.arr
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_cached_typ = Py_None;

  /* "pandas/src/reduce.pyx":82
 *             object cached_typ = None
 * 
 *         arr = self.arr             # <<<<<<<<<<<<<<
 *         chunk = self.dummy
 *         dummy_buf = chunk.data
 */
  if (!(likely(((__pyx_v_self->arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_self->arr);
  __pyx_v_arr = ((PyArrayObject *)__pyx_v_self->arr);

  /* "pandas/src/reduce.pyx":83
 * 
 *         arr = self.arr
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 *         dummy_buf = chunk.data
 *         chunk.data = arr.data
 */
  if (!(likely(((__pyx_v_self->dummy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->dummy, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_self->dummy);
  __pyx_v_chunk = ((PyArrayObject *)__pyx_v_self->dummy);

  /* "pandas/src/reduce.pyx":84
 *         arr = self.arr
 *         chunk = self.dummy
 *         dummy_buf = chunk.data             # <<<<<<<<<<<<<<
 *         chunk.data = arr.data
 *         labels = self.labels
 */
  __pyx_t_1 = __pyx_v_chunk->data;
  __pyx_v_dummy_buf = __pyx_t_1;

  /* "pandas/src/reduce.pyx":85
 *         chunk = self.dummy
 *         dummy_buf = chunk.data
 *         chunk.data = arr.data             # <<<<<<<<<<<<<<
 *         labels = self.labels
 *         index = self.index
 */
  __pyx_t_1 = __pyx_v_arr->data;
  __pyx_v_chunk->data = __pyx_t_1;

  /* "pandas/src/reduce.pyx":86
 *         dummy_buf = chunk.data
 *         chunk.data = arr.data
 *         labels = self.labels             # <<<<<<<<<<<<<<
 *         index = self.index
 *         incr = self.increment
 */
  __pyx_t_2 = __pyx_v_self->labels;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_labels = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":87
 *         chunk.data = arr.data
 *         labels = self.labels
 *         index = self.index             # <<<<<<<<<<<<<<
 *         incr = self.increment
 * 
 */
  __pyx_t_2 = __pyx_v_self->index;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_index = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":88
 *         labels = self.labels
 *         index = self.index
 *         incr = self.increment             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_3 = __pyx_v_self->increment;
  __pyx_v_incr = __pyx_t_3;

  /* "pandas/src/reduce.pyx":90
 *         incr = self.increment
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(self.nresults):
 * 
 */
  /*try:*/ {
    {
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "pandas/src/reduce.pyx":91
 * 
 *         try:
 *             for i in range(self.nresults):             # <<<<<<<<<<<<<<
 * 
 *                 if labels is not None:
 */
        __pyx_t_3 = __pyx_v_self->nresults;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_3; __pyx_t_7+=1) {
          __pyx_v_i = __pyx_t_7;

          /* "pandas/src/reduce.pyx":93
 *             for i in range(self.nresults):
 * 
 *                 if labels is not None:             # <<<<<<<<<<<<<<
 *                     name = util.get_value_at(labels, i)
 *                 else:
 */
          __pyx_t_8 = (__pyx_v_labels != Py_None);
          if (__pyx_t_8) {

            /* "pandas/src/reduce.pyx":94
 * 
 *                 if labels is not None:
 *                     name = util.get_value_at(labels, i)             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = None
 */
            if (!(likely(((__pyx_v_labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __pyx_t_2 = __pyx_v_labels;
            __Pyx_INCREF(__pyx_t_2);
            __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_2), __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_v_name);
            __pyx_v_name = __pyx_t_10;
            __pyx_t_10 = 0;
            goto __pyx_L16;
          }
          /*else*/ {

            /* "pandas/src/reduce.pyx":96
 *                     name = util.get_value_at(labels, i)
 *                 else:
 *                     name = None             # <<<<<<<<<<<<<<
 * 
 *                 # create the cached type
 */
            __Pyx_INCREF(Py_None);
            __Pyx_XDECREF(__pyx_v_name);
            __pyx_v_name = Py_None;
          }
          __pyx_L16:;

          /* "pandas/src/reduce.pyx":100
 *                 # create the cached type
 *                 # each time just reassign the data
 *                 if i == 0:             # <<<<<<<<<<<<<<
 * 
 *                     if self.typ is not None:
 */
          __pyx_t_8 = (__pyx_v_i == 0);
          if (__pyx_t_8) {

            /* "pandas/src/reduce.pyx":102
 *                 if i == 0:
 * 
 *                     if self.typ is not None:             # <<<<<<<<<<<<<<
 * 
 *                          # recreate with the index if supplied
 */
            __pyx_t_8 = (__pyx_v_self->typ != Py_None);
            if (__pyx_t_8) {

              /* "pandas/src/reduce.pyx":105
 * 
 *                          # recreate with the index if supplied
 *                          if index is not None:             # <<<<<<<<<<<<<<
 * 
 *                              cached_typ = self.typ(chunk, index=index, name=name)
 */
              __pyx_t_8 = (__pyx_v_index != Py_None);
              if (__pyx_t_8) {

                /* "pandas/src/reduce.pyx":107
 *                          if index is not None:
 * 
 *                              cached_typ = self.typ(chunk, index=index, name=name)             # <<<<<<<<<<<<<<
 * 
 *                          else:
 */
                __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
                PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_chunk));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk));
                __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __Pyx_GOTREF(((PyObject *)__pyx_t_9));
                if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__index), __pyx_v_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __pyx_t_2 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
                __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_v_cached_typ);
                __pyx_v_cached_typ = __pyx_t_2;
                __pyx_t_2 = 0;
                goto __pyx_L19;
              }
              /*else*/ {

                /* "pandas/src/reduce.pyx":112
 * 
 *                              # use the passsed typ, sans index
 *                              cached_typ = self.typ(chunk, name=name)             # <<<<<<<<<<<<<<
 * 
 *                 # use the cached_typ if possible
 */
                __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
                PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_chunk));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk));
                __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __Pyx_GOTREF(((PyObject *)__pyx_t_9));
                if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __pyx_t_10 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
                __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_v_cached_typ);
                __pyx_v_cached_typ = __pyx_t_10;
                __pyx_t_10 = 0;
              }
              __pyx_L19:;
              goto __pyx_L18;
            }
            __pyx_L18:;
            goto __pyx_L17;
          }
          __pyx_L17:;

          /* "pandas/src/reduce.pyx":115
 * 
 *                 # use the cached_typ if possible
 *                 if cached_typ is not None:             # <<<<<<<<<<<<<<
 *                     object.__setattr__(cached_typ._data._block, 'values', chunk)
 *                     object.__setattr__(cached_typ, 'name', name)
 */
          __pyx_t_8 = (__pyx_v_cached_typ != Py_None);
          if (__pyx_t_8) {

            /* "pandas/src/reduce.pyx":116
 *                 # use the cached_typ if possible
 *                 if cached_typ is not None:
 *                     object.__setattr__(cached_typ._data._block, 'values', chunk)             # <<<<<<<<<<<<<<
 *                     object.__setattr__(cached_typ, 'name', name)
 *                     res = self.f(cached_typ)
 */
            __pyx_t_10 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_9 = PyObject_GetAttr(__pyx_v_cached_typ, __pyx_n_s___data); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_2 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s___block); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
            PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_n_s__values));
            __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
            __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
            PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_v_chunk));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk));
            __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pandas/src/reduce.pyx":117
 *                 if cached_typ is not None:
 *                     object.__setattr__(cached_typ._data._block, 'values', chunk)
 *                     object.__setattr__(cached_typ, 'name', name)             # <<<<<<<<<<<<<<
 *                     res = self.f(cached_typ)
 *                 else:
 */
            __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_v_cached_typ);
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_cached_typ);
            __Pyx_GIVEREF(__pyx_v_cached_typ);
            __Pyx_INCREF(((PyObject *)__pyx_n_s__name));
            PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_n_s__name));
            __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name));
            __Pyx_INCREF(__pyx_v_name);
            PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_name);
            __Pyx_GIVEREF(__pyx_v_name);
            __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "pandas/src/reduce.pyx":118
 *                     object.__setattr__(cached_typ._data._block, 'values', chunk)
 *                     object.__setattr__(cached_typ, 'name', name)
 *                     res = self.f(cached_typ)             # <<<<<<<<<<<<<<
 *                 else:
 *                     res = self.f(chunk)
 */
            __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_INCREF(__pyx_v_cached_typ);
            PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_cached_typ);
            __Pyx_GIVEREF(__pyx_v_cached_typ);
            __pyx_t_9 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_9;
            __pyx_t_9 = 0;
            goto __pyx_L20;
          }
          /*else*/ {

            /* "pandas/src/reduce.pyx":120
 *                     res = self.f(cached_typ)
 *                 else:
 *                     res = self.f(chunk)             # <<<<<<<<<<<<<<
 * 
 *                 if hasattr(res,'values'):
 */
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
            PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_chunk));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk));
            __pyx_t_10 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_10;
            __pyx_t_10 = 0;
          }
          __pyx_L20:;

          /* "pandas/src/reduce.pyx":122
 *                     res = self.f(chunk)
 * 
 *                 if hasattr(res,'values'):             # <<<<<<<<<<<<<<
 *                     res = res.values
 * 
 */
          __pyx_t_10 = ((PyObject *)__pyx_n_s__values);
          __Pyx_INCREF(__pyx_t_10);
          __pyx_t_8 = PyObject_HasAttr(__pyx_v_res, __pyx_t_10); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_8) {

            /* "pandas/src/reduce.pyx":123
 * 
 *                 if hasattr(res,'values'):
 *                     res = res.values             # <<<<<<<<<<<<<<
 * 
 *                 if i == 0:
 */
            __pyx_t_10 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__values); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_10;
            __pyx_t_10 = 0;
            goto __pyx_L21;
          }
          __pyx_L21:;

          /* "pandas/src/reduce.pyx":125
 *                     res = res.values
 * 
 *                 if i == 0:             # <<<<<<<<<<<<<<
 *                     result = self._get_result_array(res)
 *                     it = <flatiter> PyArray_IterNew(result)
 */
          __pyx_t_8 = (__pyx_v_i == 0);
          if (__pyx_t_8) {

            /* "pandas/src/reduce.pyx":126
 * 
 *                 if i == 0:
 *                     result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                     it = <flatiter> PyArray_IterNew(result)
 * 
 */
            __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_v_res);
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_res);
            __Pyx_GIVEREF(__pyx_v_res);
            __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_XDECREF(((PyObject *)__pyx_v_result));
            __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
            __pyx_t_2 = 0;

            /* "pandas/src/reduce.pyx":127
 *                 if i == 0:
 *                     result = self._get_result_array(res)
 *                     it = <flatiter> PyArray_IterNew(result)             # <<<<<<<<<<<<<<
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 */
            __pyx_t_2 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_9 = __pyx_t_2;
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(((PyObject *)__pyx_v_it));
            __pyx_v_it = ((PyArrayIterObject *)__pyx_t_9);
            __pyx_t_9 = 0;
            goto __pyx_L22;
          }
          __pyx_L22:;

          /* "pandas/src/reduce.pyx":129
 *                     it = <flatiter> PyArray_IterNew(result)
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)             # <<<<<<<<<<<<<<
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)
 */
          if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L6_error;} }
          if (unlikely(!__pyx_v_it)) { __Pyx_RaiseUnboundLocalError("it"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L6_error;} }
          PyArray_SETITEM(__pyx_v_result, PyArray_ITER_DATA(__pyx_v_it), __pyx_v_res);

          /* "pandas/src/reduce.pyx":130
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 *                 chunk.data = chunk.data + self.increment             # <<<<<<<<<<<<<<
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:
 */
          __pyx_v_chunk->data = (__pyx_v_chunk->data + __pyx_v_self->increment);

          /* "pandas/src/reduce.pyx":131
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 *         except Exception, e:
 *             if hasattr(e, 'args'):
 */
          PyArray_ITER_NEXT(__pyx_v_it);
        }
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pandas/src/reduce.pyx":132
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:             # <<<<<<<<<<<<<<
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)
 */
      __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_11) {
        __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_e = __pyx_t_2;

        /* "pandas/src/reduce.pyx":133
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:
 *             if hasattr(e, 'args'):             # <<<<<<<<<<<<<<
 *                 e.args = e.args + (i,)
 *             raise
 */
        __pyx_t_12 = ((PyObject *)__pyx_n_s__args);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_8 = PyObject_HasAttr(__pyx_v_e, __pyx_t_12); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_8) {

          /* "pandas/src/reduce.pyx":134
 *         except Exception, e:
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
          __pyx_t_12 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__args); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_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 = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_13);
          __pyx_t_13 = 0;
          __pyx_t_13 = PyNumber_Add(__pyx_t_12, ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
          if (PyObject_SetAttr(__pyx_v_e, __pyx_n_s__args, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L25;
        }
        __pyx_L25:;

        /* "pandas/src/reduce.pyx":135
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             # so we don't free the wrong memory
 */
        __Pyx_GIVEREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_2, __pyx_t_10);
        __pyx_t_9 = 0; __pyx_t_2 = 0; __pyx_t_10 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L4;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L13_try_end:;
    }
  }

  /* "pandas/src/reduce.pyx":138
 *         finally:
 *             # so we don't free the wrong memory
 *             chunk.data = dummy_buf             # <<<<<<<<<<<<<<
 * 
 *         if result.dtype == np.object_:
 */
  /*finally:*/ {
    int __pyx_why;
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
    int __pyx_exc_lineno;
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
    __pyx_why = 0; goto __pyx_L5;
    __pyx_L4: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L5;
    }
    __pyx_L5:;
    __pyx_v_chunk->data = __pyx_v_dummy_buf;
    switch (__pyx_why) {
      case 4: {
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
        __pyx_lineno = __pyx_exc_lineno;
        __pyx_exc_type = 0;
        __pyx_exc_value = 0;
        __pyx_exc_tb = 0;
        goto __pyx_L1_error;
      }
    }
  }

  /* "pandas/src/reduce.pyx":140
 *             chunk.data = dummy_buf
 * 
 *         if result.dtype == np.object_:             # <<<<<<<<<<<<<<
 *             result = maybe_convert_objects(result)
 * 
 */
  if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__object_); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __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_RichCompare(__pyx_t_10, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "pandas/src/reduce.pyx":141
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __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[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;
    goto __pyx_L27;
  }
  __pyx_L27:;

  /* "pandas/src/reduce.pyx":143
 *             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_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_chunk);
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_labels);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_cached_typ);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), ((PyObject *)__pyx_v_res));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":145
 *         return result
 * 
 *     def _get_result_array(self, object res):             # <<<<<<<<<<<<<<
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 */

static PyObject *__pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_result_array", 0);

  /* "pandas/src/reduce.pyx":146
 * 
 *     def _get_result_array(self, object res):
 *         try:             # <<<<<<<<<<<<<<
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/src/reduce.pyx":147
 *     def _get_result_array(self, object res):
 *         try:
 *             assert(not isinstance(res, np.ndarray))             # <<<<<<<<<<<<<<
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!(!__pyx_t_5))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":148
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.nresults, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_4 = __pyx_v_self->dummy;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = (__pyx_t_6 == __pyx_t_7);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_5;
      }
      if (unlikely(!(!__pyx_t_9))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":150
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 *             result = np.empty(self.nresults, dtype='O')             # <<<<<<<<<<<<<<
 *             result[0] = res
 *         except Exception:
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->nresults); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_v_result = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "pandas/src/reduce.pyx":151
 * 
 *             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[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "pandas/src/reduce.pyx":152
 *             result = np.empty(self.nresults, dtype='O')
 *             result[0] = res
 *         except Exception:             # <<<<<<<<<<<<<<
 *             raise ValueError('function does not reduce')
 *         return result
 */
    __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_13) {
      __Pyx_AddTraceback("pandas.lib.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/src/reduce.pyx":153
 *             result[0] = res
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/src/reduce.pyx":154
 *         except Exception:
 *             raise ValueError('function does not reduce')
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas.lib.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_series = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_bins = 0;
  PyObject *__pyx_v_dummy = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__series,&__pyx_n_s__f,&__pyx_n_s__bins,&__pyx_n_s__dummy,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__series)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_series = values[0];
    __pyx_v_f = values[1];
    __pyx_v_bins = values[2];
    __pyx_v_dummy = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_bins, __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":168
 *         object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name
 * 
 *     def __init__(self, object series, object f, object bins, object dummy):             # <<<<<<<<<<<<<<
 *         n = len(series)
 * 
 */

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_bins, PyObject *__pyx_v_dummy) {
  CYTHON_UNUSED PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_values = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/src/reduce.pyx":169
 * 
 *     def __init__(self, object series, object f, object bins, object dummy):
 *         n = len(series)             # <<<<<<<<<<<<<<
 * 
 *         self.bins = bins
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":171
 *         n = len(series)
 * 
 *         self.bins = bins             # <<<<<<<<<<<<<<
 *         self.f = f
 * 
 */
  __Pyx_INCREF(__pyx_v_bins);
  __Pyx_GIVEREF(__pyx_v_bins);
  __Pyx_GOTREF(__pyx_v_self->bins);
  __Pyx_DECREF(__pyx_v_self->bins);
  __pyx_v_self->bins = __pyx_v_bins;

  /* "pandas/src/reduce.pyx":172
 * 
 *         self.bins = bins
 *         self.f = f             # <<<<<<<<<<<<<<
 * 
 *         values = series.values
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "pandas/src/reduce.pyx":174
 *         self.f = f
 * 
 *         values = series.values             # <<<<<<<<<<<<<<
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_values = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":175
 * 
 *         values = series.values
 *         if not values.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             values = values.copy('C')
 *         self.arr = values
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __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) {

    /* "pandas/src/reduce.pyx":176
 *         values = series.values
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = values
 *         self.index = series.index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_values);
    __pyx_v_values = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":177
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')
 *         self.arr = values             # <<<<<<<<<<<<<<
 *         self.index = series.index
 *         self.typ = type(series)
 */
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_values;

  /* "pandas/src/reduce.pyx":178
 *             values = values.copy('C')
 *         self.arr = values
 *         self.index = series.index             # <<<<<<<<<<<<<<
 *         self.typ = type(series)
 *         self.name = getattr(series,'name',None)
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":179
 *         self.arr = values
 *         self.index = series.index
 *         self.typ = type(series)             # <<<<<<<<<<<<<<
 *         self.name = getattr(series,'name',None)
 * 
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_series)));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_series)));
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_series));

  /* "pandas/src/reduce.pyx":180
 *         self.index = series.index
 *         self.typ = type(series)
 *         self.name = getattr(series,'name',None)             # <<<<<<<<<<<<<<
 * 
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)
 */
  __pyx_t_2 = ((PyObject *)__pyx_n_s__name);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = Py_None;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_GetAttr3(__pyx_v_series, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":182
 *         self.name = getattr(series,'name',None)
 * 
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 *         self.passed_dummy = dummy is not None
 * 
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->dummy_arr);
  __Pyx_DECREF(__pyx_v_self->dummy_arr);
  __pyx_v_self->dummy_arr = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->dummy_index);
  __Pyx_DECREF(__pyx_v_self->dummy_index);
  __pyx_v_self->dummy_index = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":183
 * 
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None             # <<<<<<<<<<<<<<
 * 
 *         # kludge for #1688
 */
  __pyx_t_5 = (__pyx_v_dummy != Py_None);
  __pyx_v_self->passed_dummy = __pyx_t_5;

  /* "pandas/src/reduce.pyx":186
 * 
 *         # kludge for #1688
 *         if len(bins) > 0 and bins[-1] == len(series):             # <<<<<<<<<<<<<<
 *             self.ngroups = len(bins)
 *         else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (__pyx_t_1 > 0);
  if (__pyx_t_5) {
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_bins, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = __pyx_t_4;
  } else {
    __pyx_t_9 = __pyx_t_5;
  }
  if (__pyx_t_9) {

    /* "pandas/src/reduce.pyx":187
 *         # kludge for #1688
 *         if len(bins) > 0 and bins[-1] == len(series):
 *             self.ngroups = len(bins)             # <<<<<<<<<<<<<<
 *         else:
 *             self.ngroups = len(bins) + 1
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->ngroups = __pyx_t_1;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":189
 *             self.ngroups = len(bins)
 *         else:
 *             self.ngroups = len(bins) + 1             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->ngroups = (__pyx_t_1 + 1);
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
    PyObject* values[1] = {0};

    /* "pandas/src/reduce.pyx":191
 *             self.ngroups = len(bins) + 1
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dummy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) {
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_dummy", 0);

  /* "pandas/src/reduce.pyx":192
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             values = np.empty(0, dtype=self.arr.dtype)
 *             index = None
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  if (__pyx_t_1) {

    /* "pandas/src/reduce.pyx":193
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *             index = None
 *         else:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __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 = 193; __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[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __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[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_30), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __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_v_values = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/src/reduce.pyx":194
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)
 *             index = None             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_index = Py_None;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":196
 *             index = None
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             values = dummy.values
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __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[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":197
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             values = dummy.values
 *             if not values.flags.contiguous:
 */
      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/reduce.pyx":198
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             values = dummy.values             # <<<<<<<<<<<<<<
 *             if not values.flags.contiguous:
 *                 values = values.copy()
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_values = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/reduce.pyx":199
 *                 raise ValueError('Dummy array must be same dtype')
 *             values = dummy.values
 *             if not values.flags.contiguous:             # <<<<<<<<<<<<<<
 *                 values = values.copy()
 *             index = dummy.index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __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[0]; __pyx_lineno = 199; __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[0]; __pyx_lineno = 199; __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) {

      /* "pandas/src/reduce.pyx":200
 *             values = dummy.values
 *             if not values.flags.contiguous:
 *                 values = values.copy()             # <<<<<<<<<<<<<<
 *             index = dummy.index
 * 
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __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 = 200; __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_values);
      __pyx_v_values = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/src/reduce.pyx":201
 *             if not values.flags.contiguous:
 *                 values = values.copy()
 *             index = dummy.index             # <<<<<<<<<<<<<<
 * 
 *         return values, index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_index = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":203
 *             index = dummy.index
 * 
 *         return values, index             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __Pyx_INCREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_result (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":205
 *         return values, index
 * 
 *     def get_result(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr, result
 */

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_group_size;
  PyObject *__pyx_v_res = 0;
  int __pyx_v_initialized;
  struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_vslider = 0;
  struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_islider = 0;
  PyObject *__pyx_v_gin = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_cached_typ = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = 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;
  __pyx_t_5numpy_int64_t __pyx_t_12;
  long __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result", 0);
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;

  /* "pandas/src/reduce.pyx":211
 *             Py_ssize_t i, n, group_size
 *             object res
 *             bint initialized = 0             # <<<<<<<<<<<<<<
 *             Slider vslider, islider
 *             object gin, typ, name
 */
  __pyx_v_initialized = 0;

  /* "pandas/src/reduce.pyx":214
 *             Slider vslider, islider
 *             object gin, typ, name
 *             object cached_typ = None             # <<<<<<<<<<<<<<
 * 
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_cached_typ = Py_None;

  /* "pandas/src/reduce.pyx":216
 *             object cached_typ = None
 * 
 *         counts = np.zeros(self.ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *         if self.ngroups > 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __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[0]; __pyx_lineno = 216; __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_self->ngroups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __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[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __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[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __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[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __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[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/reduce.pyx":218
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 * 
 *         if self.ngroups > 0:             # <<<<<<<<<<<<<<
 *             counts[0] = self.bins[0]
 *             for i in range(1, self.ngroups):
 */
  __pyx_t_11 = (__pyx_v_self->ngroups > 0);
  if (__pyx_t_11) {

    /* "pandas/src/reduce.pyx":219
 * 
 *         if self.ngroups > 0:
 *             counts[0] = self.bins[0]             # <<<<<<<<<<<<<<
 *             for i in range(1, self.ngroups):
 *                 if i == self.ngroups - 1:
 */
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->bins, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = 0;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12;

    /* "pandas/src/reduce.pyx":220
 *         if self.ngroups > 0:
 *             counts[0] = self.bins[0]
 *             for i in range(1, self.ngroups):             # <<<<<<<<<<<<<<
 *                 if i == self.ngroups - 1:
 *                     counts[i] = len(self.arr) - self.bins[i-1]
 */
    __pyx_t_14 = __pyx_v_self->ngroups;
    for (__pyx_t_15 = 1; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i = __pyx_t_15;

      /* "pandas/src/reduce.pyx":221
 *             counts[0] = self.bins[0]
 *             for i in range(1, self.ngroups):
 *                 if i == self.ngroups - 1:             # <<<<<<<<<<<<<<
 *                     counts[i] = len(self.arr) - self.bins[i-1]
 *                 else:
 */
      __pyx_t_11 = (__pyx_v_i == (__pyx_v_self->ngroups - 1));
      if (__pyx_t_11) {

        /* "pandas/src/reduce.pyx":222
 *             for i in range(1, self.ngroups):
 *                 if i == self.ngroups - 1:
 *                     counts[i] = len(self.arr) - self.bins[i-1]             # <<<<<<<<<<<<<<
 *                 else:
 *                     counts[i] = self.bins[i] - self.bins[i-1]
 */
        __pyx_t_5 = __pyx_v_self->arr;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_16 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_16 = (__pyx_v_i - 1);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_t_16, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_counts.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "pandas/src/reduce.pyx":224
 *                     counts[i] = len(self.arr) - self.bins[i-1]
 *                 else:
 *                     counts[i] = self.bins[i] - self.bins[i-1]             # <<<<<<<<<<<<<<
 * 
 *         group_size = 0
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_17 = (__pyx_v_i - 1);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_t_17, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_17 < 0) {
          __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
          if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12;
      }
      __pyx_L6:;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":226
 *                     counts[i] = self.bins[i] - self.bins[i-1]
 * 
 *         group_size = 0             # <<<<<<<<<<<<<<
 *         n = len(self.arr)
 *         name = self.name
 */
  __pyx_v_group_size = 0;

  /* "pandas/src/reduce.pyx":227
 * 
 *         group_size = 0
 *         n = len(self.arr)             # <<<<<<<<<<<<<<
 *         name = self.name
 * 
 */
  __pyx_t_5 = __pyx_v_self->arr;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_14 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_n = __pyx_t_14;

  /* "pandas/src/reduce.pyx":228
 *         group_size = 0
 *         n = len(self.arr)
 *         name = self.name             # <<<<<<<<<<<<<<
 * 
 *         vslider = Slider(self.arr, self.dummy_arr)
 */
  __pyx_t_5 = __pyx_v_self->name;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_v_name = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/reduce.pyx":230
 *         name = self.name
 * 
 *         vslider = Slider(self.arr, self.dummy_arr)             # <<<<<<<<<<<<<<
 *         islider = Slider(self.index, self.dummy_index)
 * 
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_self->arr);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->arr);
  __Pyx_GIVEREF(__pyx_v_self->arr);
  __Pyx_INCREF(__pyx_v_self->dummy_arr);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->dummy_arr);
  __Pyx_GIVEREF(__pyx_v_self->dummy_arr);
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_v_vslider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":231
 * 
 *         vslider = Slider(self.arr, self.dummy_arr)
 *         islider = Slider(self.index, self.dummy_index)             # <<<<<<<<<<<<<<
 * 
 *         gin = self.dummy_index._engine
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->index);
  __Pyx_GIVEREF(__pyx_v_self->index);
  __Pyx_INCREF(__pyx_v_self->dummy_index);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dummy_index);
  __Pyx_GIVEREF(__pyx_v_self->dummy_index);
  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/reduce.pyx":233
 *         islider = Slider(self.index, self.dummy_index)
 * 
 *         gin = self.dummy_index._engine             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_self->dummy_index, __pyx_n_s___engine); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_gin = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/reduce.pyx":235
 *         gin = self.dummy_index._engine
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(self.ngroups):
 *                 group_size = counts[i]
 */
  /*try:*/ {
    {
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "pandas/src/reduce.pyx":236
 * 
 *         try:
 *             for i in range(self.ngroups):             # <<<<<<<<<<<<<<
 *                 group_size = counts[i]
 * 
 */
        __pyx_t_14 = __pyx_v_self->ngroups;
        for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
          __pyx_v_i = __pyx_t_15;

          /* "pandas/src/reduce.pyx":237
 *         try:
 *             for i in range(self.ngroups):
 *                 group_size = counts[i]             # <<<<<<<<<<<<<<
 * 
 *                 islider.set_length(group_size)
 */
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          }
          __pyx_v_group_size = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides));

          /* "pandas/src/reduce.pyx":239
 *                 group_size = counts[i]
 * 
 *                 islider.set_length(group_size)             # <<<<<<<<<<<<<<
 *                 vslider.set_length(group_size)
 * 
 */
          __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->set_length(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pandas/src/reduce.pyx":240
 * 
 *                 islider.set_length(group_size)
 *                 vslider.set_length(group_size)             # <<<<<<<<<<<<<<
 * 
 *                 if cached_typ is None:
 */
          __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->set_length(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pandas/src/reduce.pyx":242
 *                 vslider.set_length(group_size)
 * 
 *                 if cached_typ is None:             # <<<<<<<<<<<<<<
 *                     cached_typ = self.typ(vslider.buf, index=islider.buf,
 *                                           name=name)
 */
          __pyx_t_11 = (__pyx_v_cached_typ == Py_None);
          if (__pyx_t_11) {

            /* "pandas/src/reduce.pyx":243
 * 
 *                 if cached_typ is None:
 *                     cached_typ = self.typ(vslider.buf, index=islider.buf,             # <<<<<<<<<<<<<<
 *                                           name=name)
 *                 else:
 */
            __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf));
            PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_vslider->buf));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf));
            __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_1));
            if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_v_islider->buf)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;}

            /* "pandas/src/reduce.pyx":244
 *                 if cached_typ is None:
 *                     cached_typ = self.typ(vslider.buf, index=islider.buf,
 *                                           name=name)             # <<<<<<<<<<<<<<
 *                 else:
 *                     object.__setattr__(cached_typ._data._block, 'values', vslider.buf)
 */
            if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __pyx_t_3 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_v_cached_typ);
            __pyx_v_cached_typ = __pyx_t_3;
            __pyx_t_3 = 0;
            goto __pyx_L20;
          }
          /*else*/ {

            /* "pandas/src/reduce.pyx":246
 *                                           name=name)
 *                 else:
 *                     object.__setattr__(cached_typ._data._block, 'values', vslider.buf)             # <<<<<<<<<<<<<<
 *                     object.__setattr__(cached_typ, '_index', islider.buf)
 *                     object.__setattr__(cached_typ, 'name', name)
 */
            __pyx_t_3 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_1 = PyObject_GetAttr(__pyx_v_cached_typ, __pyx_n_s___data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s___block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __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 = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_1);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_5);
            __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
            PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__values));
            __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
            __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf));
            PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_vslider->buf));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf));
            __pyx_t_5 = 0;
            __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pandas/src/reduce.pyx":247
 *                 else:
 *                     object.__setattr__(cached_typ._data._block, 'values', vslider.buf)
 *                     object.__setattr__(cached_typ, '_index', islider.buf)             # <<<<<<<<<<<<<<
 *                     object.__setattr__(cached_typ, 'name', name)
 * 
 */
            __pyx_t_5 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_cached_typ);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ);
            __Pyx_GIVEREF(__pyx_v_cached_typ);
            __Pyx_INCREF(((PyObject *)__pyx_n_s___index));
            PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s___index));
            __Pyx_GIVEREF(((PyObject *)__pyx_n_s___index));
            __Pyx_INCREF(((PyObject *)__pyx_v_islider->buf));
            PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_islider->buf));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_islider->buf));
            __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pandas/src/reduce.pyx":248
 *                     object.__setattr__(cached_typ._data._block, 'values', vslider.buf)
 *                     object.__setattr__(cached_typ, '_index', islider.buf)
 *                     object.__setattr__(cached_typ, 'name', name)             # <<<<<<<<<<<<<<
 * 
 *                 res = self.f(cached_typ)
 */
            __pyx_t_3 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_cached_typ);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ);
            __Pyx_GIVEREF(__pyx_v_cached_typ);
            __Pyx_INCREF(((PyObject *)__pyx_n_s__name));
            PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__name));
            __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name));
            __Pyx_INCREF(__pyx_v_name);
            PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_name);
            __Pyx_GIVEREF(__pyx_v_name);
            __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __pyx_L20:;

          /* "pandas/src/reduce.pyx":250
 *                     object.__setattr__(cached_typ, 'name', name)
 * 
 *                 res = self.f(cached_typ)             # <<<<<<<<<<<<<<
 *                 res = _extract_result(res)
 *                 if not initialized:
 */
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_cached_typ);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cached_typ);
          __Pyx_GIVEREF(__pyx_v_cached_typ);
          __pyx_t_1 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_v_res);
          __pyx_v_res = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "pandas/src/reduce.pyx":251
 * 
 *                 res = self.f(cached_typ)
 *                 res = _extract_result(res)             # <<<<<<<<<<<<<<
 *                 if not initialized:
 *                     result = self._get_result_array(res)
 */
          __pyx_t_1 = __pyx_f_6pandas_3lib__extract_result(__pyx_v_res); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_v_res);
          __pyx_v_res = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "pandas/src/reduce.pyx":252
 *                 res = self.f(cached_typ)
 *                 res = _extract_result(res)
 *                 if not initialized:             # <<<<<<<<<<<<<<
 *                     result = self._get_result_array(res)
 *                     initialized = 1
 */
          __pyx_t_11 = (!__pyx_v_initialized);
          if (__pyx_t_11) {

            /* "pandas/src/reduce.pyx":253
 *                 res = _extract_result(res)
 *                 if not initialized:
 *                     result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                     initialized = 1
 * 
 */
            __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_v_res);
            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_res);
            __Pyx_GIVEREF(__pyx_v_res);
            __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
            __Pyx_XDECREF(((PyObject *)__pyx_v_result));
            __pyx_v_result = ((PyArrayObject *)__pyx_t_3);
            __pyx_t_3 = 0;

            /* "pandas/src/reduce.pyx":254
 *                 if not initialized:
 *                     result = self._get_result_array(res)
 *                     initialized = 1             # <<<<<<<<<<<<<<
 * 
 *                 util.assign_value_1d(result, i, res)
 */
            __pyx_v_initialized = 1;
            goto __pyx_L21;
          }
          __pyx_L21:;

          /* "pandas/src/reduce.pyx":256
 *                     initialized = 1
 * 
 *                 util.assign_value_1d(result, i, res)             # <<<<<<<<<<<<<<
 * 
 *                 islider.advance(group_size)
 */
          if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L10_error;} }
          __pyx_t_7 = assign_value_1d(__pyx_v_result, __pyx_v_i, __pyx_v_res); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L10_error;}

          /* "pandas/src/reduce.pyx":258
 *                 util.assign_value_1d(result, i, res)
 * 
 *                 islider.advance(group_size)             # <<<<<<<<<<<<<<
 *                 vslider.advance(group_size)
 * 
 */
          __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pandas/src/reduce.pyx":259
 * 
 *                 islider.advance(group_size)
 *                 vslider.advance(group_size)             # <<<<<<<<<<<<<<
 * 
 *                 gin.clear_mapping()
 */
          __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pandas/src/reduce.pyx":261
 *                 vslider.advance(group_size)
 * 
 *                 gin.clear_mapping()             # <<<<<<<<<<<<<<
 *         except:
 *             raise
 */
          __pyx_t_3 = PyObject_GetAttr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L17_try_end;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/src/reduce.pyx":262
 * 
 *                 gin.clear_mapping()
 *         except:             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
      /*except:*/ {
        __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_1);

        /* "pandas/src/reduce.pyx":263
 *                 gin.clear_mapping()
 *         except:
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             # so we don't free the wrong memory
 */
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_ErrRestore(__pyx_t_5, __pyx_t_3, __pyx_t_1);
        __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L11_exception_handled;
      }
      __pyx_L12_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      goto __pyx_L8;
      __pyx_L11_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_L17_try_end:;
    }
  }

  /* "pandas/src/reduce.pyx":266
 *         finally:
 *             # so we don't free the wrong memory
 *             islider.reset()             # <<<<<<<<<<<<<<
 *             vslider.reset()
 * 
 */
  /*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_L9;
    __pyx_L8: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L9;
    }
    __pyx_L9:;
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/src/reduce.pyx":267
 *             # so we don't free the wrong memory
 *             islider.reset()
 *             vslider.reset()             # <<<<<<<<<<<<<<
 * 
 *         if result.dtype == np.object_:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L25;
    __pyx_L24_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_L25:;
    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;
      }
    }
  }

  /* "pandas/src/reduce.pyx":269
 *             vslider.reset()
 * 
 *         if result.dtype == np.object_:             # <<<<<<<<<<<<<<
 *             result = maybe_convert_objects(result)
 * 
 */
  if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __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 = 269; __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[0]; __pyx_lineno = 269; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_11) {

    /* "pandas/src/reduce.pyx":270
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result, counts
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __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_5)); __pyx_t_5 = 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 = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L26;
  }
  __pyx_L26:;

  /* "pandas/src/reduce.pyx":272
 *             result = maybe_convert_objects(result)
 * 
 *         return result, counts             # <<<<<<<<<<<<<<
 * 
 *     def _get_result_array(self, object res):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF((PyObject *)__pyx_v_vslider);
  __Pyx_XDECREF((PyObject *)__pyx_v_islider);
  __Pyx_XDECREF(__pyx_v_gin);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_cached_typ);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":274
 *         return result, counts
 * 
 *     def _get_result_array(self, object res):             # <<<<<<<<<<<<<<
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 */

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_result_array", 0);

  /* "pandas/src/reduce.pyx":275
 * 
 *     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_arr)))
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/src/reduce.pyx":276
 *     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_arr)))
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!(!__pyx_t_5))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":277
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_4 = __pyx_v_self->dummy_arr;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = (__pyx_t_6 == __pyx_t_7);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_5;
      }
      if (unlikely(!(!__pyx_t_9))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":279
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr)))
 * 
 *             result = np.empty(self.ngroups, dtype='O')             # <<<<<<<<<<<<<<
 *         except Exception:
 *             raise ValueError('function does not reduce')
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_v_result = __pyx_t_12;
      __pyx_t_12 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "pandas/src/reduce.pyx":280
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:             # <<<<<<<<<<<<<<
 *             raise ValueError('function does not reduce')
 *         return result
 */
    __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_13) {
      __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/src/reduce.pyx":281
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/src/reduce.pyx":282
 *         except Exception:
 *             raise ValueError('function does not reduce')
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":166
 * 
 *     cdef public:
 *         object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, object series, object f, object bins, object dummy):
 */

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->arr);
  __pyx_r = __pyx_v_self->arr;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->index);
  __pyx_r = __pyx_v_self->index;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dummy_arr);
  __pyx_r = __pyx_v_self->dummy_arr;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dummy_arr);
  __Pyx_DECREF(__pyx_v_self->dummy_arr);
  __pyx_v_self->dummy_arr = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dummy_arr);
  __Pyx_DECREF(__pyx_v_self->dummy_arr);
  __pyx_v_self->dummy_arr = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dummy_index);
  __pyx_r = __pyx_v_self->dummy_index;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dummy_index);
  __Pyx_DECREF(__pyx_v_self->dummy_index);
  __pyx_v_self->dummy_index = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dummy_index);
  __Pyx_DECREF(__pyx_v_self->dummy_index);
  __pyx_v_self->dummy_index = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->values);
  __pyx_r = __pyx_v_self->values;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(__pyx_v_self->values);
  __pyx_v_self->values = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(__pyx_v_self->values);
  __pyx_v_self->values = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->f);
  __pyx_r = __pyx_v_self->f;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->bins);
  __pyx_r = __pyx_v_self->bins;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->bins);
  __Pyx_DECREF(__pyx_v_self->bins);
  __pyx_v_self->bins = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->bins);
  __Pyx_DECREF(__pyx_v_self->bins);
  __pyx_v_self->bins = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->typ);
  __pyx_r = __pyx_v_self->typ;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = Py_None;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_series = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_ngroups;
  PyObject *__pyx_v_dummy = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__series,&__pyx_n_s__f,&__pyx_n_s__labels,&__pyx_n_s__ngroups,&__pyx_n_s__dummy,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__series)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_series = values[0];
    __pyx_v_f = values[1];
    __pyx_v_labels = values[2];
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_dummy = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_labels, __pyx_v_ngroups, __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":297
 *         object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name
 * 
 *     def __init__(self, object series, object f, object labels,             # <<<<<<<<<<<<<<
 *                  Py_ssize_t ngroups, object dummy):
 *         n = len(series)
 */

static int __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy) {
  CYTHON_UNUSED PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_values = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/src/reduce.pyx":299
 *     def __init__(self, object series, object f, object labels,
 *                  Py_ssize_t ngroups, object dummy):
 *         n = len(series)             # <<<<<<<<<<<<<<
 * 
 *         self.labels = labels
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":301
 *         n = len(series)
 * 
 *         self.labels = labels             # <<<<<<<<<<<<<<
 *         self.f = f
 * 
 */
  __Pyx_INCREF(__pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_labels;

  /* "pandas/src/reduce.pyx":302
 * 
 *         self.labels = labels
 *         self.f = f             # <<<<<<<<<<<<<<
 * 
 *         values = series.values
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "pandas/src/reduce.pyx":304
 *         self.f = f
 * 
 *         values = series.values             # <<<<<<<<<<<<<<
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_values = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":305
 * 
 *         values = series.values
 *         if not values.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             values = values.copy('C')
 *         self.arr = values
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __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) {

    /* "pandas/src/reduce.pyx":306
 *         values = series.values
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = values
 *         self.index = series.index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_values);
    __pyx_v_values = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":307
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')
 *         self.arr = values             # <<<<<<<<<<<<<<
 *         self.index = series.index
 *         self.typ = type(series)
 */
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_values;

  /* "pandas/src/reduce.pyx":308
 *             values = values.copy('C')
 *         self.arr = values
 *         self.index = series.index             # <<<<<<<<<<<<<<
 *         self.typ = type(series)
 *         self.name = getattr(series,'name',None)
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":309
 *         self.arr = values
 *         self.index = series.index
 *         self.typ = type(series)             # <<<<<<<<<<<<<<
 *         self.name = getattr(series,'name',None)
 * 
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_series)));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_series)));
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_series));

  /* "pandas/src/reduce.pyx":310
 *         self.index = series.index
 *         self.typ = type(series)
 *         self.name = getattr(series,'name',None)             # <<<<<<<<<<<<<<
 * 
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)
 */
  __pyx_t_2 = ((PyObject *)__pyx_n_s__name);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = Py_None;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_GetAttr3(__pyx_v_series, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":312
 *         self.name = getattr(series,'name',None)
 * 
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 *         self.passed_dummy = dummy is not None
 *         self.ngroups = ngroups
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->dummy_arr);
  __Pyx_DECREF(__pyx_v_self->dummy_arr);
  __pyx_v_self->dummy_arr = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->dummy_index);
  __Pyx_DECREF(__pyx_v_self->dummy_index);
  __pyx_v_self->dummy_index = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":313
 * 
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None             # <<<<<<<<<<<<<<
 *         self.ngroups = ngroups
 * 
 */
  __pyx_t_5 = (__pyx_v_dummy != Py_None);
  __pyx_v_self->passed_dummy = __pyx_t_5;

  /* "pandas/src/reduce.pyx":314
 *         self.dummy_arr, self.dummy_index = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None
 *         self.ngroups = ngroups             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
  __pyx_v_self->ngroups = __pyx_v_ngroups;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
    PyObject* values[1] = {0};

    /* "pandas/src/reduce.pyx":316
 *         self.ngroups = ngroups
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dummy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) {
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_dummy", 0);

  /* "pandas/src/reduce.pyx":317
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             values = np.empty(0, dtype=self.arr.dtype)
 *             index  = None
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  if (__pyx_t_1) {

    /* "pandas/src/reduce.pyx":318
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *             index  = None
 *         else:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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 = 318; __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[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_34), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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_v_values = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/src/reduce.pyx":319
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)
 *             index  = None             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_index = Py_None;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":321
 *             index  = None
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             values = dummy.values
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __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[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":322
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             values = dummy.values
 *             if not values.flags.contiguous:
 */
      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/reduce.pyx":323
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             values = dummy.values             # <<<<<<<<<<<<<<
 *             if not values.flags.contiguous:
 *                 values = values.copy()
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_values = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/reduce.pyx":324
 *                 raise ValueError('Dummy array must be same dtype')
 *             values = dummy.values
 *             if not values.flags.contiguous:             # <<<<<<<<<<<<<<
 *                 values = values.copy()
 *             index  = dummy.index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __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[0]; __pyx_lineno = 324; __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[0]; __pyx_lineno = 324; __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) {

      /* "pandas/src/reduce.pyx":325
 *             values = dummy.values
 *             if not values.flags.contiguous:
 *                 values = values.copy()             # <<<<<<<<<<<<<<
 *             index  = dummy.index
 * 
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 = 325; __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_values);
      __pyx_v_values = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/src/reduce.pyx":326
 *             if not values.flags.contiguous:
 *                 values = values.copy()
 *             index  = dummy.index             # <<<<<<<<<<<<<<
 * 
 *         return values, index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_index = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":328
 *             index  = dummy.index
 * 
 *         return values, index             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __Pyx_INCREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_result (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":330
 *         return values, index
 * 
 *     def get_result(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr, result
 */

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_group_size;
  Py_ssize_t __pyx_v_lab;
  PyObject *__pyx_v_res = 0;
  int __pyx_v_initialized;
  struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_vslider = 0;
  struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_islider = 0;
  PyObject *__pyx_v_gin = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_cached_typ = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArrayObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  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;
  int __pyx_t_16;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result", 0);
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;

  /* "pandas/src/reduce.pyx":336
 *             Py_ssize_t i, n, group_size, lab
 *             object res
 *             bint initialized = 0             # <<<<<<<<<<<<<<
 *             Slider vslider, islider
 *             object gin, typ, name
 */
  __pyx_v_initialized = 0;

  /* "pandas/src/reduce.pyx":339
 *             Slider vslider, islider
 *             object gin, typ, name
 *             object cached_typ = None             # <<<<<<<<<<<<<<
 * 
 *         labels = self.labels
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_cached_typ = Py_None;

  /* "pandas/src/reduce.pyx":341
 *             object cached_typ = None
 * 
 *         labels = self.labels             # <<<<<<<<<<<<<<
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 *         group_size = 0
 */
  if (!(likely(((__pyx_v_self->labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_v_self->labels);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_v_self->labels);
  __pyx_v_labels = ((PyArrayObject *)__pyx_v_self->labels);

  /* "pandas/src/reduce.pyx":342
 * 
 *         labels = self.labels
 *         counts = np.zeros(self.ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         group_size = 0
 *         n = len(self.arr)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __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[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __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[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pandas/src/reduce.pyx":343
 *         labels = self.labels
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 *         group_size = 0             # <<<<<<<<<<<<<<
 *         n = len(self.arr)
 *         name = self.name
 */
  __pyx_v_group_size = 0;

  /* "pandas/src/reduce.pyx":344
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 *         group_size = 0
 *         n = len(self.arr)             # <<<<<<<<<<<<<<
 *         name = self.name
 * 
 */
  __pyx_t_10 = __pyx_v_self->arr;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_t_11 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_n = __pyx_t_11;

  /* "pandas/src/reduce.pyx":345
 *         group_size = 0
 *         n = len(self.arr)
 *         name = self.name             # <<<<<<<<<<<<<<
 * 
 *         vslider = Slider(self.arr, self.dummy_arr)
 */
  __pyx_t_10 = __pyx_v_self->name;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_v_name = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "pandas/src/reduce.pyx":347
 *         name = self.name
 * 
 *         vslider = Slider(self.arr, self.dummy_arr)             # <<<<<<<<<<<<<<
 *         islider = Slider(self.index, self.dummy_index)
 * 
 */
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_v_self->arr);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self->arr);
  __Pyx_GIVEREF(__pyx_v_self->arr);
  __Pyx_INCREF(__pyx_v_self->dummy_arr);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_self->dummy_arr);
  __Pyx_GIVEREF(__pyx_v_self->dummy_arr);
  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __pyx_v_vslider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":348
 * 
 *         vslider = Slider(self.arr, self.dummy_arr)
 *         islider = Slider(self.index, self.dummy_index)             # <<<<<<<<<<<<<<
 * 
 *         gin = self.dummy_index._engine
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->index);
  __Pyx_GIVEREF(__pyx_v_self->index);
  __Pyx_INCREF(__pyx_v_self->dummy_index);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->dummy_index);
  __Pyx_GIVEREF(__pyx_v_self->dummy_index);
  __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pandas/src/reduce.pyx":350
 *         islider = Slider(self.index, self.dummy_index)
 * 
 *         gin = self.dummy_index._engine             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self->dummy_index, __pyx_n_s___engine); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_v_gin = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "pandas/src/reduce.pyx":352
 *         gin = self.dummy_index._engine
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 group_size += 1
 */
  /*try:*/ {
    {
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "pandas/src/reduce.pyx":353
 * 
 *         try:
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 group_size += 1
 * 
 */
        __pyx_t_11 = __pyx_v_n;
        for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
          __pyx_v_i = __pyx_t_12;

          /* "pandas/src/reduce.pyx":354
 *         try:
 *             for i in range(n):
 *                 group_size += 1             # <<<<<<<<<<<<<<
 * 
 *                 lab = labels[i]
 */
          __pyx_v_group_size = (__pyx_v_group_size + 1);

          /* "pandas/src/reduce.pyx":356
 *                 group_size += 1
 * 
 *                 lab = labels[i]             # <<<<<<<<<<<<<<
 * 
 *                 if i == n - 1 or lab != labels[i + 1]:
 */
          __pyx_t_13 = __pyx_v_i;
          __pyx_t_2 = -1;
          if (__pyx_t_13 < 0) {
            __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_2 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0;
          if (unlikely(__pyx_t_2 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_2);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          }
          __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides));

          /* "pandas/src/reduce.pyx":358
 *                 lab = labels[i]
 * 
 *                 if i == n - 1 or lab != labels[i + 1]:             # <<<<<<<<<<<<<<
 *                     if lab == -1:
 *                         islider.advance(group_size)
 */
          __pyx_t_14 = (__pyx_v_i == (__pyx_v_n - 1));
          if (!__pyx_t_14) {
            __pyx_t_15 = (__pyx_v_i + 1);
            __pyx_t_2 = -1;
            if (__pyx_t_15 < 0) {
              __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape;
              if (unlikely(__pyx_t_15 < 0)) __pyx_t_2 = 0;
            } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0;
            if (unlikely(__pyx_t_2 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_2);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            }
            __pyx_t_16 = (__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides)));
            __pyx_t_17 = __pyx_t_16;
          } else {
            __pyx_t_17 = __pyx_t_14;
          }
          if (__pyx_t_17) {

            /* "pandas/src/reduce.pyx":359
 * 
 *                 if i == n - 1 or lab != labels[i + 1]:
 *                     if lab == -1:             # <<<<<<<<<<<<<<
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)
 */
            __pyx_t_17 = (__pyx_v_lab == -1);
            if (__pyx_t_17) {

              /* "pandas/src/reduce.pyx":360
 *                 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_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "pandas/src/reduce.pyx":361
 *                     if lab == -1:
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)             # <<<<<<<<<<<<<<
 *                         group_size = 0
 *                         continue
 */
              __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "pandas/src/reduce.pyx":362
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)
 *                         group_size = 0             # <<<<<<<<<<<<<<
 *                         continue
 * 
 */
              __pyx_v_group_size = 0;

              /* "pandas/src/reduce.pyx":363
 *                         vslider.advance(group_size)
 *                         group_size = 0
 *                         continue             # <<<<<<<<<<<<<<
 * 
 *                     islider.set_length(group_size)
 */
              goto __pyx_L14_continue;
              goto __pyx_L17;
            }
            __pyx_L17:;

            /* "pandas/src/reduce.pyx":365
 *                         continue
 * 
 *                     islider.set_length(group_size)             # <<<<<<<<<<<<<<
 *                     vslider.set_length(group_size)
 * 
 */
            __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->set_length(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "pandas/src/reduce.pyx":366
 * 
 *                     islider.set_length(group_size)
 *                     vslider.set_length(group_size)             # <<<<<<<<<<<<<<
 * 
 *                     if cached_typ is None:
 */
            __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->set_length(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "pandas/src/reduce.pyx":368
 *                     vslider.set_length(group_size)
 * 
 *                     if cached_typ is None:             # <<<<<<<<<<<<<<
 *                         cached_typ = self.typ(vslider.buf, index=islider.buf,
 *                                               name=name)
 */
            __pyx_t_17 = (__pyx_v_cached_typ == Py_None);
            if (__pyx_t_17) {

              /* "pandas/src/reduce.pyx":369
 * 
 *                     if cached_typ is None:
 *                         cached_typ = self.typ(vslider.buf, index=islider.buf,             # <<<<<<<<<<<<<<
 *                                               name=name)
 *                     else:
 */
              __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf));
              PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_vslider->buf));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf));
              __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(((PyObject *)__pyx_t_6));
              if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_v_islider->buf)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;}

              /* "pandas/src/reduce.pyx":370
 *                     if cached_typ is None:
 *                         cached_typ = self.typ(vslider.buf, index=islider.buf,
 *                                               name=name)             # <<<<<<<<<<<<<<
 *                     else:
 *                         object.__setattr__(cached_typ._data._block, 'values', vslider.buf)
 */
              if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __pyx_t_8 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_v_cached_typ);
              __pyx_v_cached_typ = __pyx_t_8;
              __pyx_t_8 = 0;
              goto __pyx_L18;
            }
            /*else*/ {

              /* "pandas/src/reduce.pyx":372
 *                                               name=name)
 *                     else:
 *                         object.__setattr__(cached_typ._data._block, 'values', vslider.buf)             # <<<<<<<<<<<<<<
 *                         object.__setattr__(cached_typ, '_index', islider.buf)
 *                         object.__setattr__(cached_typ, 'name', name)
 */
              __pyx_t_8 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_6 = PyObject_GetAttr(__pyx_v_cached_typ, __pyx_n_s___data); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_10 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s___block); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10);
              __Pyx_GIVEREF(__pyx_t_10);
              __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
              PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__values));
              __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
              __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf));
              PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_vslider->buf));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf));
              __pyx_t_10 = 0;
              __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "pandas/src/reduce.pyx":373
 *                     else:
 *                         object.__setattr__(cached_typ._data._block, 'values', vslider.buf)
 *                         object.__setattr__(cached_typ, '_index', islider.buf)             # <<<<<<<<<<<<<<
 *                         object.__setattr__(cached_typ, 'name', name)
 * 
 */
              __pyx_t_10 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_v_cached_typ);
              PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cached_typ);
              __Pyx_GIVEREF(__pyx_v_cached_typ);
              __Pyx_INCREF(((PyObject *)__pyx_n_s___index));
              PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s___index));
              __Pyx_GIVEREF(((PyObject *)__pyx_n_s___index));
              __Pyx_INCREF(((PyObject *)__pyx_v_islider->buf));
              PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_islider->buf));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_islider->buf));
              __pyx_t_8 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

              /* "pandas/src/reduce.pyx":374
 *                         object.__setattr__(cached_typ._data._block, 'values', vslider.buf)
 *                         object.__setattr__(cached_typ, '_index', islider.buf)
 *                         object.__setattr__(cached_typ, 'name', name)             # <<<<<<<<<<<<<<
 * 
 *                     res = self.f(cached_typ)
 */
              __pyx_t_8 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_v_cached_typ);
              PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cached_typ);
              __Pyx_GIVEREF(__pyx_v_cached_typ);
              __Pyx_INCREF(((PyObject *)__pyx_n_s__name));
              PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__name));
              __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name));
              __Pyx_INCREF(__pyx_v_name);
              PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_name);
              __Pyx_GIVEREF(__pyx_v_name);
              __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            }
            __pyx_L18:;

            /* "pandas/src/reduce.pyx":376
 *                         object.__setattr__(cached_typ, 'name', name)
 * 
 *                     res = self.f(cached_typ)             # <<<<<<<<<<<<<<
 *                     res = _extract_result(res)
 *                     if not initialized:
 */
            __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_INCREF(__pyx_v_cached_typ);
            PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_cached_typ);
            __Pyx_GIVEREF(__pyx_v_cached_typ);
            __pyx_t_6 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "pandas/src/reduce.pyx":377
 * 
 *                     res = self.f(cached_typ)
 *                     res = _extract_result(res)             # <<<<<<<<<<<<<<
 *                     if not initialized:
 *                         result = self._get_result_array(res)
 */
            __pyx_t_6 = __pyx_f_6pandas_3lib__extract_result(__pyx_v_res); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "pandas/src/reduce.pyx":378
 *                     res = self.f(cached_typ)
 *                     res = _extract_result(res)
 *                     if not initialized:             # <<<<<<<<<<<<<<
 *                         result = self._get_result_array(res)
 *                         initialized = 1
 */
            __pyx_t_17 = (!__pyx_v_initialized);
            if (__pyx_t_17) {

              /* "pandas/src/reduce.pyx":379
 *                     res = _extract_result(res)
 *                     if not initialized:
 *                         result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                         initialized = 1
 * 
 */
              __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_INCREF(__pyx_v_res);
              PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_res);
              __Pyx_GIVEREF(__pyx_v_res);
              __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
              if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_XDECREF(((PyObject *)__pyx_v_result));
              __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
              __pyx_t_8 = 0;

              /* "pandas/src/reduce.pyx":380
 *                     if not initialized:
 *                         result = self._get_result_array(res)
 *                         initialized = 1             # <<<<<<<<<<<<<<
 * 
 *                     util.assign_value_1d(result, lab, res)
 */
              __pyx_v_initialized = 1;
              goto __pyx_L19;
            }
            __pyx_L19:;

            /* "pandas/src/reduce.pyx":382
 *                         initialized = 1
 * 
 *                     util.assign_value_1d(result, lab, res)             # <<<<<<<<<<<<<<
 *                     counts[lab] = group_size
 *                     islider.advance(group_size)
 */
            if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L6_error;} }
            __pyx_t_2 = assign_value_1d(__pyx_v_result, __pyx_v_lab, __pyx_v_res); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L6_error;}

            /* "pandas/src/reduce.pyx":383
 * 
 *                     util.assign_value_1d(result, lab, res)
 *                     counts[lab] = group_size             # <<<<<<<<<<<<<<
 *                     islider.advance(group_size)
 *                     vslider.advance(group_size)
 */
            __pyx_t_18 = __pyx_v_lab;
            __pyx_t_2 = -1;
            if (__pyx_t_18 < 0) {
              __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape;
              if (unlikely(__pyx_t_18 < 0)) __pyx_t_2 = 0;
            } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_2 = 0;
            if (unlikely(__pyx_t_2 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_2);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_v_group_size;

            /* "pandas/src/reduce.pyx":384
 *                     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_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "pandas/src/reduce.pyx":385
 *                     counts[lab] = group_size
 *                     islider.advance(group_size)
 *                     vslider.advance(group_size)             # <<<<<<<<<<<<<<
 * 
 *                     group_size = 0
 */
            __pyx_t_8 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "pandas/src/reduce.pyx":387
 *                     vslider.advance(group_size)
 * 
 *                     group_size = 0             # <<<<<<<<<<<<<<
 * 
 *                     gin.clear_mapping()
 */
            __pyx_v_group_size = 0;

            /* "pandas/src/reduce.pyx":389
 *                     group_size = 0
 * 
 *                     gin.clear_mapping()             # <<<<<<<<<<<<<<
 * 
 *         except:
 */
            __pyx_t_8 = PyObject_GetAttr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            goto __pyx_L16;
          }
          __pyx_L16:;
          __pyx_L14_continue:;
        }
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "pandas/src/reduce.pyx":391
 *                     gin.clear_mapping()
 * 
 *         except:             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
      /*except:*/ {
        __Pyx_AddTraceback("pandas.lib.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_8, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);

        /* "pandas/src/reduce.pyx":392
 * 
 *         except:
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             # so we don't free the wrong memory
 */
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_ErrRestore(__pyx_t_10, __pyx_t_8, __pyx_t_6);
        __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_6 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L4;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L13_try_end:;
    }
  }

  /* "pandas/src/reduce.pyx":395
 *         finally:
 *             # so we don't free the wrong memory
 *             islider.reset()             # <<<<<<<<<<<<<<
 *             vslider.reset()
 * 
 */
  /*finally:*/ {
    int __pyx_why;
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
    int __pyx_exc_lineno;
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
    __pyx_why = 0; goto __pyx_L5;
    __pyx_L4: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L5;
    }
    __pyx_L5:;
    __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/src/reduce.pyx":396
 *             # so we don't free the wrong memory
 *             islider.reset()
 *             vslider.reset()             # <<<<<<<<<<<<<<
 * 
 *         if result.dtype == np.object_:
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L23;
    __pyx_L22_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_L23:;
    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;
      }
    }
  }

  /* "pandas/src/reduce.pyx":398
 *             vslider.reset()
 * 
 *         if result.dtype == np.object_:             # <<<<<<<<<<<<<<
 *             result = maybe_convert_objects(result)
 * 
 */
  if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__object_); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_17) {

    /* "pandas/src/reduce.pyx":399
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result, counts
 */
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L24;
  }
  __pyx_L24:;

  /* "pandas/src/reduce.pyx":401
 *             result = maybe_convert_objects(result)
 * 
 *         return result, counts             # <<<<<<<<<<<<<<
 * 
 *     def _get_result_array(self, object res):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF((PyObject *)__pyx_v_vslider);
  __Pyx_XDECREF((PyObject *)__pyx_v_islider);
  __Pyx_XDECREF(__pyx_v_gin);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_cached_typ);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":403
 *         return result, counts
 * 
 *     def _get_result_array(self, object res):             # <<<<<<<<<<<<<<
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 */

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_result_array", 0);

  /* "pandas/src/reduce.pyx":404
 * 
 *     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_arr)))
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/src/reduce.pyx":405
 *     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_arr)))
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!(!__pyx_t_5))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":406
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_4 = __pyx_v_self->dummy_arr;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = (__pyx_t_6 == __pyx_t_7);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_5;
      }
      if (unlikely(!(!__pyx_t_9))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":408
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr)))
 * 
 *             result = np.empty(self.ngroups, dtype='O')             # <<<<<<<<<<<<<<
 *         except Exception:
 *             raise ValueError('function does not reduce')
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_v_result = __pyx_t_12;
      __pyx_t_12 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "pandas/src/reduce.pyx":409
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:             # <<<<<<<<<<<<<<
 *             raise ValueError('function does not reduce')
 *         return result
 */
    __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_13) {
      __Pyx_AddTraceback("pandas.lib.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/src/reduce.pyx":410
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/src/reduce.pyx":411
 *         except Exception:
 *             raise ValueError('function does not reduce')
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline _extract_result(object res):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":295
 * 
 *     cdef public:
 *         object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, object series, object f, object labels,
 */

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->arr);
  __pyx_r = __pyx_v_self->arr;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->index);
  __pyx_r = __pyx_v_self->index;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dummy_arr);
  __pyx_r = __pyx_v_self->dummy_arr;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dummy_arr);
  __Pyx_DECREF(__pyx_v_self->dummy_arr);
  __pyx_v_self->dummy_arr = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dummy_arr);
  __Pyx_DECREF(__pyx_v_self->dummy_arr);
  __pyx_v_self->dummy_arr = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dummy_index);
  __pyx_r = __pyx_v_self->dummy_index;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dummy_index);
  __Pyx_DECREF(__pyx_v_self->dummy_index);
  __pyx_v_self->dummy_index = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dummy_index);
  __Pyx_DECREF(__pyx_v_self->dummy_index);
  __pyx_v_self->dummy_index = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->f);
  __pyx_r = __pyx_v_self->f;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->labels);
  __pyx_r = __pyx_v_self->labels;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->values);
  __pyx_r = __pyx_v_self->values;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(__pyx_v_self->values);
  __pyx_v_self->values = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(__pyx_v_self->values);
  __pyx_v_self->values = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->typ);
  __pyx_r = __pyx_v_self->typ;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->typ);
  __Pyx_DECREF(__pyx_v_self->typ);
  __pyx_v_self->typ = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = Py_None;

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

/* "pandas/src/reduce.pyx":413
 *         return result
 * 
 * cdef inline _extract_result(object res):             # <<<<<<<<<<<<<<
 *     ''' extract the result object, it might be a 0-dim ndarray
 *         or a len-1 0-dim, or a scalar '''
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_3lib__extract_result(PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_result", 0);
  __Pyx_INCREF(__pyx_v_res);

  /* "pandas/src/reduce.pyx":416
 *     ''' extract the result object, it might be a 0-dim ndarray
 *         or a len-1 0-dim, or a scalar '''
 *     if hasattr(res,'values'):             # <<<<<<<<<<<<<<
 *        res = res.values
 *     if not np.isscalar(res):
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_s__values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_HasAttr(__pyx_v_res, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":417
 *         or a len-1 0-dim, or a scalar '''
 *     if hasattr(res,'values'):
 *        res = res.values             # <<<<<<<<<<<<<<
 *     if not np.isscalar(res):
 *        if isinstance(res, np.ndarray):
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_res);
    __pyx_v_res = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":418
 *     if hasattr(res,'values'):
 *        res = res.values
 *     if not np.isscalar(res):             # <<<<<<<<<<<<<<
 *        if isinstance(res, np.ndarray):
 *           if res.ndim == 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isscalar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __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 = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_res);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_res);
  __Pyx_GIVEREF(__pyx_v_res);
  __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 = 418; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (!__pyx_t_2);
  if (__pyx_t_5) {

    /* "pandas/src/reduce.pyx":419
 *        res = res.values
 *     if not np.isscalar(res):
 *        if isinstance(res, np.ndarray):             # <<<<<<<<<<<<<<
 *           if res.ndim == 0:
 *              res = res.item()
 */
    __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "pandas/src/reduce.pyx":420
 *     if not np.isscalar(res):
 *        if isinstance(res, np.ndarray):
 *           if res.ndim == 0:             # <<<<<<<<<<<<<<
 *              res = res.item()
 *           elif res.ndim == 1 and len(res) == 1:
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "pandas/src/reduce.pyx":421
 *        if isinstance(res, np.ndarray):
 *           if res.ndim == 0:
 *              res = res.item()             # <<<<<<<<<<<<<<
 *           elif res.ndim == 1 and len(res) == 1:
 *              res = res[0]
 */
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __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_res);
        __pyx_v_res = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L6;
      }

      /* "pandas/src/reduce.pyx":422
 *           if res.ndim == 0:
 *              res = res.item()
 *           elif res.ndim == 1 and len(res) == 1:             # <<<<<<<<<<<<<<
 *              res = res[0]
 *     return res
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {
        __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = (__pyx_t_6 == 1);
        __pyx_t_7 = __pyx_t_2;
      } else {
        __pyx_t_7 = __pyx_t_5;
      }
      if (__pyx_t_7) {

        /* "pandas/src/reduce.pyx":423
 *              res = res.item()
 *           elif res.ndim == 1 and len(res) == 1:
 *              res = res[0]             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_res, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_v_res);
        __pyx_v_res = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/reduce.pyx":424
 *           elif res.ndim == 1 and len(res) == 1:
 *              res = res[0]
 *     return res             # <<<<<<<<<<<<<<
 * 
 * cdef class Slider:
 */
  __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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.lib._extract_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_buf = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__buf,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = values[0];
    __pyx_v_buf = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_6Slider___init__(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), __pyx_v_values, __pyx_v_buf);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":435
 *         char *orig_data
 * 
 *     def __init__(self, object values, object buf):             # <<<<<<<<<<<<<<
 *         assert(values.ndim == 1)
 *         if not values.flags.contiguous:
 */

static int __pyx_pf_6pandas_3lib_6Slider___init__(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_values);

  /* "pandas/src/reduce.pyx":436
 * 
 *     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[0]; __pyx_lineno = 436; __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); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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[0]; __pyx_lineno = 436; __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[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/src/reduce.pyx":437
 *     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[0]; __pyx_lineno = 437; __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[0]; __pyx_lineno = 437; __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[0]; __pyx_lineno = 437; __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) {

    /* "pandas/src/reduce.pyx":438
 *         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[0]; __pyx_lineno = 438; __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[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_values);
    __pyx_v_values = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":440
 *             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[0]; __pyx_lineno = 440; __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[0]; __pyx_lineno = 440; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __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[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/src/reduce.pyx":441
 * 
 *         assert(values.dtype == buf.dtype)
 *         self.values = values             # <<<<<<<<<<<<<<
 *         self.buf = buf
 *         self.stride = values.strides[0]
 */
  if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->values));
  __pyx_v_self->values = ((PyArrayObject *)__pyx_v_values);

  /* "pandas/src/reduce.pyx":442
 *         assert(values.dtype == buf.dtype)
 *         self.values = values
 *         self.buf = buf             # <<<<<<<<<<<<<<
 *         self.stride = values.strides[0]
 * 
 */
  if (!(likely(((__pyx_v_buf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_buf, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  __Pyx_GOTREF(__pyx_v_self->buf);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->buf));
  __pyx_v_self->buf = ((PyArrayObject *)__pyx_v_buf);

  /* "pandas/src/reduce.pyx":443
 *         self.values = values
 *         self.buf = buf
 *         self.stride = values.strides[0]             # <<<<<<<<<<<<<<
 * 
 *         self.orig_data = self.buf.data
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__strides); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __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[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->stride = __pyx_t_6;

  /* "pandas/src/reduce.pyx":445
 *         self.stride = values.strides[0]
 * 
 *         self.orig_data = self.buf.data             # <<<<<<<<<<<<<<
 *         self.orig_len = self.buf.shape[0]
 *         self.orig_stride = self.buf.strides[0]
 */
  __pyx_t_7 = __pyx_v_self->buf->data;
  __pyx_v_self->orig_data = __pyx_t_7;

  /* "pandas/src/reduce.pyx":446
 * 
 *         self.orig_data = self.buf.data
 *         self.orig_len = self.buf.shape[0]             # <<<<<<<<<<<<<<
 *         self.orig_stride = self.buf.strides[0]
 * 
 */
  __pyx_v_self->orig_len = (__pyx_v_self->buf->dimensions[0]);

  /* "pandas/src/reduce.pyx":447
 *         self.orig_data = self.buf.data
 *         self.orig_len = self.buf.shape[0]
 *         self.orig_stride = self.buf.strides[0]             # <<<<<<<<<<<<<<
 * 
 *         self.buf.data = self.values.data
 */
  __pyx_v_self->orig_stride = (__pyx_v_self->buf->strides[0]);

  /* "pandas/src/reduce.pyx":449
 *         self.orig_stride = self.buf.strides[0]
 * 
 *         self.buf.data = self.values.data             # <<<<<<<<<<<<<<
 *         self.buf.strides[0] = self.stride
 * 
 */
  __pyx_t_7 = __pyx_v_self->values->data;
  __pyx_v_self->buf->data = __pyx_t_7;

  /* "pandas/src/reduce.pyx":450
 * 
 *         self.buf.data = self.values.data
 *         self.buf.strides[0] = self.stride             # <<<<<<<<<<<<<<
 * 
 *     cpdef advance(self, Py_ssize_t k):
 */
  __pyx_t_6 = __pyx_v_self->stride;
  (__pyx_v_self->buf->strides[0]) = __pyx_t_6;

  __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.lib.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":452
 *         self.buf.strides[0] = self.stride
 * 
 *     cpdef advance(self, Py_ssize_t k):             # <<<<<<<<<<<<<<
 *         self.buf.data = <char*> self.buf.data + self.stride * k
 * 
 */

static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_6Slider_advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("advance", 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__advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_3advance)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __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[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __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;
  }

  /* "pandas/src/reduce.pyx":453
 * 
 *     cpdef advance(self, Py_ssize_t k):
 *         self.buf.data = <char*> self.buf.data + self.stride * k             # <<<<<<<<<<<<<<
 * 
 *     cdef move(self, int start, int end):
 */
  __pyx_v_self->buf->data = (((char *)__pyx_v_self->buf->data) + (__pyx_v_self->stride * __pyx_v_k));

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) {
  Py_ssize_t __pyx_v_k;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("advance (wrapper)", 0);
  assert(__pyx_arg_k); {
    __pyx_v_k = __Pyx_PyIndex_AsSsize_t(__pyx_arg_k); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.Slider.advance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_6Slider_2advance(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), ((Py_ssize_t)__pyx_v_k));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":452
 *         self.buf.strides[0] = self.stride
 * 
 *     cpdef advance(self, Py_ssize_t k):             # <<<<<<<<<<<<<<
 *         self.buf.data = <char*> self.buf.data + self.stride * k
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_6Slider_2advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("advance", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->advance(__pyx_v_self, __pyx_v_k, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __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.lib.Slider.advance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":455
 *         self.buf.data = <char*> self.buf.data + self.stride * k
 * 
 *     cdef move(self, int start, int end):             # <<<<<<<<<<<<<<
 *         '''
 *         For slicing
 */

static PyObject *__pyx_f_6pandas_3lib_6Slider_move(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("move", 0);

  /* "pandas/src/reduce.pyx":459
 *         For slicing
 *         '''
 *         self.buf.data = self.values.data + self.stride * start             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = end - start
 * 
 */
  __pyx_v_self->buf->data = (__pyx_v_self->values->data + (__pyx_v_self->stride * __pyx_v_start));

  /* "pandas/src/reduce.pyx":460
 *         '''
 *         self.buf.data = self.values.data + self.stride * start
 *         self.buf.shape[0] = end - start             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_length(self, Py_ssize_t length):
 */
  (__pyx_v_self->buf->dimensions[0]) = (__pyx_v_end - __pyx_v_start);

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

/* "pandas/src/reduce.pyx":462
 *         self.buf.shape[0] = end - start
 * 
 *     cpdef set_length(self, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = length
 * 
 */

static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_6Slider_set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_length", 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__set_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_5set_length)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __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[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __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;
  }

  /* "pandas/src/reduce.pyx":463
 * 
 *     cpdef set_length(self, Py_ssize_t length):
 *         self.buf.shape[0] = length             # <<<<<<<<<<<<<<
 * 
 *     cpdef reset(self):
 */
  (__pyx_v_self->buf->dimensions[0]) = __pyx_v_length;

  __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.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length) {
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_length (wrapper)", 0);
  assert(__pyx_arg_length); {
    __pyx_v_length = __Pyx_PyIndex_AsSsize_t(__pyx_arg_length); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_6Slider_4set_length(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), ((Py_ssize_t)__pyx_v_length));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":462
 *         self.buf.shape[0] = end - start
 * 
 *     cpdef set_length(self, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = length
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_6Slider_4set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_length", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->set_length(__pyx_v_self, __pyx_v_length, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __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.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":465
 *         self.buf.shape[0] = length
 * 
 *     cpdef reset(self):             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = self.orig_len
 *         self.buf.data = self.orig_data
 */

static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_6Slider_reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset", 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__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_7reset)) {
      __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[0]; __pyx_lineno = 465; __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;
  }

  /* "pandas/src/reduce.pyx":466
 * 
 *     cpdef reset(self):
 *         self.buf.shape[0] = self.orig_len             # <<<<<<<<<<<<<<
 *         self.buf.data = self.orig_data
 *         self.buf.strides[0] = self.orig_stride
 */
  __pyx_t_3 = __pyx_v_self->orig_len;
  (__pyx_v_self->buf->dimensions[0]) = __pyx_t_3;

  /* "pandas/src/reduce.pyx":467
 *     cpdef reset(self):
 *         self.buf.shape[0] = self.orig_len
 *         self.buf.data = self.orig_data             # <<<<<<<<<<<<<<
 *         self.buf.strides[0] = self.orig_stride
 * 
 */
  __pyx_t_4 = __pyx_v_self->orig_data;
  __pyx_v_self->buf->data = __pyx_t_4;

  /* "pandas/src/reduce.pyx":468
 *         self.buf.shape[0] = self.orig_len
 *         self.buf.data = self.orig_data
 *         self.buf.strides[0] = self.orig_stride             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __pyx_v_self->orig_stride;
  (__pyx_v_self->buf->strides[0]) = __pyx_t_3;

  __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.lib.Slider.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_6Slider_6reset(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":465
 *         self.buf.shape[0] = length
 * 
 *     cpdef reset(self):             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = self.orig_len
 *         self.buf.data = self.orig_data
 */

static PyObject *__pyx_pf_6pandas_3lib_6Slider_6reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __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.lib.Slider.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_101apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_101apply_frame_axis0 = {__Pyx_NAMESTR("apply_frame_axis0"), (PyCFunction)__pyx_pw_6pandas_3lib_101apply_frame_axis0, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_101apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_frame = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_names = 0;
  PyArrayObject *__pyx_v_starts = 0;
  PyArrayObject *__pyx_v_ends = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_frame_axis0 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frame,&__pyx_n_s__f,&__pyx_n_s__names,&__pyx_n_s__starts,&__pyx_n_s__ends,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frame)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__names)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__starts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ends)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_frame_axis0") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_frame = values[0];
    __pyx_v_f = values[1];
    __pyx_v_names = values[2];
    __pyx_v_starts = ((PyArrayObject *)values[3]);
    __pyx_v_ends = ((PyArrayObject *)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starts), __pyx_ptype_5numpy_ndarray, 1, "starts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ends), __pyx_ptype_5numpy_ndarray, 1, "ends", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_100apply_frame_axis0(__pyx_self, __pyx_v_frame, __pyx_v_f, __pyx_v_names, __pyx_v_starts, __pyx_v_ends);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":474
 *     pass
 * 
 * def apply_frame_axis0(object frame, object f, object names,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] starts, ndarray[int64_t] ends):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_100apply_frame_axis0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_f, PyObject *__pyx_v_names, PyArrayObject *__pyx_v_starts, PyArrayObject *__pyx_v_ends) {
  struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_slider = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_v_piece = 0;
  PyObject *__pyx_v_item_cache = 0;
  PyObject *__pyx_v_chunk = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_shape_before = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_mutated;
  PyObject *__pyx_v_gin = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ends;
  __Pyx_Buffer __pyx_pybuffer_ends;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_starts;
  __Pyx_Buffer __pyx_pybuffer_starts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  long __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_frame_axis0", 0);
  __pyx_pybuffer_starts.pybuffer.buf = NULL;
  __pyx_pybuffer_starts.refcount = 0;
  __pyx_pybuffernd_starts.data = NULL;
  __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts;
  __pyx_pybuffer_ends.pybuffer.buf = NULL;
  __pyx_pybuffer_ends.refcount = 0;
  __pyx_pybuffernd_ends.data = NULL;
  __pyx_pybuffernd_ends.rcbuffer = &__pyx_pybuffer_ends;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ends.rcbuffer->pybuffer, (PyObject*)__pyx_v_ends, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_ends.diminfo[0].strides = __pyx_pybuffernd_ends.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ends.diminfo[0].shape = __pyx_pybuffernd_ends.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/reduce.pyx":478
 *     cdef:
 *         BlockSlider slider
 *         Py_ssize_t i, n = len(starts)             # <<<<<<<<<<<<<<
 *         list results
 *         object piece
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_starts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/reduce.pyx":483
 *         dict item_cache
 * 
 *     if frame.index._has_complex_internals:             # <<<<<<<<<<<<<<
 *         raise InvalidApply('Cannot modify frame index internals')
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_frame, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s_37); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/src/reduce.pyx":484
 * 
 *     if frame.index._has_complex_internals:
 *         raise InvalidApply('Cannot modify frame index internals')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":487
 * 
 * 
 *     results = []             # <<<<<<<<<<<<<<
 * 
 *     # Need to infer if our low-level mucking is going to cause a segfault
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_results = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":490
 * 
 *     # Need to infer if our low-level mucking is going to cause a segfault
 *     if n > 0:             # <<<<<<<<<<<<<<
 *         chunk = frame[starts[0]:ends[0]]
 *         shape_before = chunk.shape
 */
  __pyx_t_4 = (__pyx_v_n > 0);
  if (__pyx_t_4) {

    /* "pandas/src/reduce.pyx":491
 *     # Need to infer if our low-level mucking is going to cause a segfault
 *     if n > 0:
 *         chunk = frame[starts[0]:ends[0]]             # <<<<<<<<<<<<<<
 *         shape_before = chunk.shape
 *         try:
 */
    __pyx_t_5 = 0;
    __pyx_t_6 = -1;
    if (__pyx_t_5 < 0) {
      __pyx_t_5 += __pyx_pybuffernd_starts.diminfo[0].shape;
      if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_t_6 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_ends.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_ends.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_frame, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_ends.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_chunk = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/reduce.pyx":492
 *     if n > 0:
 *         chunk = frame[starts[0]:ends[0]]
 *         shape_before = chunk.shape             # <<<<<<<<<<<<<<
 *         try:
 *             result = f(chunk)
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_chunk, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_shape_before = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/reduce.pyx":493
 *         chunk = frame[starts[0]:ends[0]]
 *         shape_before = chunk.shape
 *         try:             # <<<<<<<<<<<<<<
 *             result = f(chunk)
 *             if result is chunk:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "pandas/src/reduce.pyx":494
 *         shape_before = chunk.shape
 *         try:
 *             result = f(chunk)             # <<<<<<<<<<<<<<
 *             if result is chunk:
 *                 raise InvalidApply('Function unsafe for fast apply')
 */
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_chunk);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chunk);
        __Pyx_GIVEREF(__pyx_v_chunk);
        __pyx_t_3 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_v_result = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pandas/src/reduce.pyx":495
 *         try:
 *             result = f(chunk)
 *             if result is chunk:             # <<<<<<<<<<<<<<
 *                 raise InvalidApply('Function unsafe for fast apply')
 *         except:
 */
        __pyx_t_4 = (__pyx_v_result == __pyx_v_chunk);
        if (__pyx_t_4) {

          /* "pandas/src/reduce.pyx":496
 *             result = f(chunk)
 *             if result is chunk:
 *                 raise InvalidApply('Function unsafe for fast apply')             # <<<<<<<<<<<<<<
 *         except:
 *             raise InvalidApply('Let this error raise above us')
 */
          __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          goto __pyx_L13;
        }
        __pyx_L13:;
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/src/reduce.pyx":497
 *             if result is chunk:
 *                 raise InvalidApply('Function unsafe for fast apply')
 *         except:             # <<<<<<<<<<<<<<
 *             raise InvalidApply('Let this error raise above us')
 * 
 */
      /*except:*/ {
        __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_11);

        /* "pandas/src/reduce.pyx":498
 *                 raise InvalidApply('Function unsafe for fast apply')
 *         except:
 *             raise InvalidApply('Let this error raise above us')             # <<<<<<<<<<<<<<
 * 
 *     slider = BlockSlider(frame)
 */
        __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(__pyx_t_13, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_L12_try_end:;
    }
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/reduce.pyx":500
 *             raise InvalidApply('Let this error raise above us')
 * 
 *     slider = BlockSlider(frame)             # <<<<<<<<<<<<<<
 * 
 *     mutated = False
 */
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(__pyx_v_frame);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_frame);
  __Pyx_GIVEREF(__pyx_v_frame);
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_BlockSlider)), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  __pyx_v_slider = ((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/src/reduce.pyx":502
 *     slider = BlockSlider(frame)
 * 
 *     mutated = False             # <<<<<<<<<<<<<<
 *     item_cache = slider.dummy._item_cache
 *     gin = slider.dummy.index._engine # f7u12
 */
  __pyx_v_mutated = 0;

  /* "pandas/src/reduce.pyx":503
 * 
 *     mutated = False
 *     item_cache = slider.dummy._item_cache             # <<<<<<<<<<<<<<
 *     gin = slider.dummy.index._engine # f7u12
 *     try:
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_slider->dummy, __pyx_n_s___item_cache); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __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[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_item_cache = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/src/reduce.pyx":504
 *     mutated = False
 *     item_cache = slider.dummy._item_cache
 *     gin = slider.dummy.index._engine # f7u12             # <<<<<<<<<<<<<<
 *     try:
 *         for i in range(n):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_slider->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___engine); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_gin = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "pandas/src/reduce.pyx":505
 *     item_cache = slider.dummy._item_cache
 *     gin = slider.dummy.index._engine # f7u12
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             slider.move(starts[i], ends[i])
 */
  /*try:*/ {

    /* "pandas/src/reduce.pyx":506
 *     gin = slider.dummy.index._engine # f7u12
 *     try:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             slider.move(starts[i], ends[i])
 * 
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_1; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/src/reduce.pyx":507
 *     try:
 *         for i in range(n):
 *             slider.move(starts[i], ends[i])             # <<<<<<<<<<<<<<
 * 
 *             item_cache.clear() # ugh
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_starts.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17;}
      }
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_ends.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_ends.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17;}
      }
      __pyx_t_11 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->move(__pyx_v_slider, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_ends.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pandas/src/reduce.pyx":509
 *             slider.move(starts[i], ends[i])
 * 
 *             item_cache.clear() # ugh             # <<<<<<<<<<<<<<
 *             gin.clear_mapping()
 * 
 */
      if (unlikely(((PyObject *)__pyx_v_item_cache) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "clear");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L17;}
      }
      __pyx_t_17 = __Pyx_PyDict_Clear(__pyx_v_item_cache); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L17;}

      /* "pandas/src/reduce.pyx":510
 * 
 *             item_cache.clear() # ugh
 *             gin.clear_mapping()             # <<<<<<<<<<<<<<
 * 
 *             object.__setattr__(slider.dummy, 'name', names[i])
 */
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pandas/src/reduce.pyx":512
 *             gin.clear_mapping()
 * 
 *             object.__setattr__(slider.dummy, 'name', names[i])             # <<<<<<<<<<<<<<
 *             piece = f(slider.dummy)
 * 
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_names, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_slider->dummy);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_slider->dummy);
      __Pyx_GIVEREF(__pyx_v_slider->dummy);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__name));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__name));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name));
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pandas/src/reduce.pyx":513
 * 
 *             object.__setattr__(slider.dummy, 'name', names[i])
 *             piece = f(slider.dummy)             # <<<<<<<<<<<<<<
 * 
 *             # I'm paying the price for index-sharing, ugh
 */
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_slider->dummy);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_slider->dummy);
      __Pyx_GIVEREF(__pyx_v_slider->dummy);
      __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_v_piece);
      __pyx_v_piece = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/src/reduce.pyx":516
 * 
 *             # I'm paying the price for index-sharing, ugh
 *             try:             # <<<<<<<<<<<<<<
 *                 if piece.index is slider.dummy.index:
 *                     piece = piece.copy()
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "pandas/src/reduce.pyx":517
 *             # I'm paying the price for index-sharing, ugh
 *             try:
 *                 if piece.index is slider.dummy.index:             # <<<<<<<<<<<<<<
 *                     piece = piece.copy()
 *                 else:
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_piece, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = PyObject_GetAttr(__pyx_v_slider->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_4 = (__pyx_t_2 == __pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (__pyx_t_4) {

            /* "pandas/src/reduce.pyx":518
 *             try:
 *                 if piece.index is slider.dummy.index:
 *                     piece = piece.copy()             # <<<<<<<<<<<<<<
 *                 else:
 *                     mutated = True
 */
            __pyx_t_11 = PyObject_GetAttr(__pyx_v_piece, __pyx_n_s__copy); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L21_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 = 518; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_v_piece);
            __pyx_v_piece = __pyx_t_2;
            __pyx_t_2 = 0;
            goto __pyx_L29;
          }
          /*else*/ {

            /* "pandas/src/reduce.pyx":520
 *                     piece = piece.copy()
 *                 else:
 *                     mutated = True             # <<<<<<<<<<<<<<
 *             except AttributeError:
 *                 pass
 */
            __pyx_v_mutated = 1;
          }
          __pyx_L29:;
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L28_try_end;
        __pyx_L21_error:;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pandas/src/reduce.pyx":521
 *                 else:
 *                     mutated = True
 *             except AttributeError:             # <<<<<<<<<<<<<<
 *                 pass
 *             results.append(piece)
 */
        __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_6) {
          PyErr_Restore(0,0,0);
          goto __pyx_L22_exception_handled;
        }
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        goto __pyx_L17;
        __pyx_L22_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        __pyx_L28_try_end:;
      }

      /* "pandas/src/reduce.pyx":523
 *             except AttributeError:
 *                 pass
 *             results.append(piece)             # <<<<<<<<<<<<<<
 *     finally:
 *         slider.reset()
 */
      __pyx_t_17 = PyList_Append(__pyx_v_results, __pyx_v_piece); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L17;}
    }
  }

  /* "pandas/src/reduce.pyx":525
 *             results.append(piece)
 *     finally:
 *         slider.reset()             # <<<<<<<<<<<<<<
 * 
 *     return results, mutated
 */
  /*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_L18;
    __pyx_L17: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L18;
    }
    __pyx_L18:;
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->reset(__pyx_v_slider); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L30_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L31;
    __pyx_L30_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_L31:;
    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;
      }
    }
  }

  /* "pandas/src/reduce.pyx":527
 *         slider.reset()
 * 
 *     return results, mutated             # <<<<<<<<<<<<<<
 * 
 * cdef class BlockSlider:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_mutated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(((PyObject *)__pyx_v_results));
  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_results));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_results));
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ends.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ends.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_slider);
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XDECREF(__pyx_v_piece);
  __Pyx_XDECREF(__pyx_v_item_cache);
  __Pyx_XDECREF(__pyx_v_chunk);
  __Pyx_XDECREF(__pyx_v_shape_before);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_gin);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_frame = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frame,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frame)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_frame = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.BlockSlider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider___init__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), __pyx_v_frame);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":543
 *         char **base_ptrs
 * 
 *     def __init__(self, frame):             # <<<<<<<<<<<<<<
 *         self.frame = frame
 *         self.dummy = frame[:0]
 */

static int __pyx_pf_6pandas_3lib_11BlockSlider___init__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_frame) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_block = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  char *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/src/reduce.pyx":544
 * 
 *     def __init__(self, frame):
 *         self.frame = frame             # <<<<<<<<<<<<<<
 *         self.dummy = frame[:0]
 * 
 */
  __Pyx_INCREF(__pyx_v_frame);
  __Pyx_GIVEREF(__pyx_v_frame);
  __Pyx_GOTREF(__pyx_v_self->frame);
  __Pyx_DECREF(__pyx_v_self->frame);
  __pyx_v_self->frame = __pyx_v_frame;

  /* "pandas/src/reduce.pyx":545
 *     def __init__(self, frame):
 *         self.frame = frame
 *         self.dummy = frame[:0]             # <<<<<<<<<<<<<<
 * 
 *         self.blocks = [b.values for b in self.dummy._data.blocks]
 */
  __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_frame, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":547
 *         self.dummy = frame[:0]
 * 
 *         self.blocks = [b.values for b in self.dummy._data.blocks]             # <<<<<<<<<<<<<<
 * 
 *         for x in self.blocks:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->dummy, __pyx_n_s___data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__blocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_b);
    __pyx_v_b = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_b, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)__pyx_t_1);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->blocks);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks));
  __pyx_v_self->blocks = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":549
 *         self.blocks = [b.values for b in self.dummy._data.blocks]
 * 
 *         for x in self.blocks:             # <<<<<<<<<<<<<<
 *             util.set_array_not_contiguous(x)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_self->blocks) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/src/reduce.pyx":550
 * 
 *         for x in self.blocks:
 *             util.set_array_not_contiguous(x)             # <<<<<<<<<<<<<<
 * 
 *         self.nblocks = len(self.blocks)
 */
    if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __pyx_v_x;
    __Pyx_INCREF(__pyx_t_1);
    set_array_not_contiguous(((PyArrayObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":552
 *             util.set_array_not_contiguous(x)
 * 
 *         self.nblocks = len(self.blocks)             # <<<<<<<<<<<<<<
 *         self.idx_slider = Slider(self.frame.index, self.dummy.index)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->blocks);
  __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[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->nblocks = __pyx_t_4;

  /* "pandas/src/reduce.pyx":553
 * 
 *         self.nblocks = len(self.blocks)
 *         self.idx_slider = Slider(self.frame.index, self.dummy.index)             # <<<<<<<<<<<<<<
 * 
 *         self.base_ptrs = <char**> malloc(sizeof(char*) * len(self.blocks))
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->frame, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __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[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->idx_slider);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider));
  __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":555
 *         self.idx_slider = Slider(self.frame.index, self.dummy.index)
 * 
 *         self.base_ptrs = <char**> malloc(sizeof(char*) * len(self.blocks))             # <<<<<<<<<<<<<<
 *         for i, block in enumerate(self.blocks):
 *             self.base_ptrs[i] = (<ndarray> block).data
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->blocks);
  __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[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->base_ptrs = ((char **)malloc(((sizeof(char *)) * __pyx_t_4)));

  /* "pandas/src/reduce.pyx":556
 * 
 *         self.base_ptrs = <char**> malloc(sizeof(char*) * len(self.blocks))
 *         for i, block in enumerate(self.blocks):             # <<<<<<<<<<<<<<
 *             self.base_ptrs[i] = (<ndarray> block).data
 * 
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;
  __pyx_t_3 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_block);
    __pyx_v_block = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_i);
    __pyx_v_i = __pyx_t_1;
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/reduce.pyx":557
 *         self.base_ptrs = <char**> malloc(sizeof(char*) * len(self.blocks))
 *         for i, block in enumerate(self.blocks):
 *             self.base_ptrs[i] = (<ndarray> block).data             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    __pyx_t_6 = ((PyArrayObject *)__pyx_v_block)->data;
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_self->base_ptrs[__pyx_t_7]) = __pyx_t_6;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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.lib.BlockSlider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_block);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "pandas/src/reduce.pyx":559
 *             self.base_ptrs[i] = (<ndarray> block).data
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free(self.base_ptrs)
 * 
 */

static void __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pandas/src/reduce.pyx":560
 * 
 *     def __dealloc__(self):
 *         free(self.base_ptrs)             # <<<<<<<<<<<<<<
 * 
 *     cpdef move(self, int start, int end):
 */
  free(__pyx_v_self->base_ptrs);

  __Pyx_RefNannyFinishContext();
}

/* "pandas/src/reduce.pyx":562
 *         free(self.base_ptrs)
 * 
 *     cpdef move(self, int start, int end):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr
 */

static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_3lib_11BlockSlider_move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end, int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("move", 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__move); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_11BlockSlider_5move)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __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[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __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;
  }

  /* "pandas/src/reduce.pyx":567
 * 
 *         # move blocks
 *         for i in range(self.nblocks):             # <<<<<<<<<<<<<<
 *             arr = self.blocks[i]
 * 
 */
  __pyx_t_5 = __pyx_v_self->nblocks;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/src/reduce.pyx":568
 *         # move blocks
 *         for i in range(self.nblocks):
 *             arr = self.blocks[i]             # <<<<<<<<<<<<<<
 * 
 *             # axis=1 is the frame's axis=0
 */
    if (unlikely(((PyObject *)__pyx_v_self->blocks) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->blocks), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __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[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/src/reduce.pyx":571
 * 
 *             # axis=1 is the frame's axis=0
 *             arr.data = self.base_ptrs[i] + arr.strides[1] * start             # <<<<<<<<<<<<<<
 *             arr.shape[1] = end - start
 * 
 */
    __pyx_v_arr->data = ((__pyx_v_self->base_ptrs[__pyx_v_i]) + ((__pyx_v_arr->strides[1]) * __pyx_v_start));

    /* "pandas/src/reduce.pyx":572
 *             # axis=1 is the frame's axis=0
 *             arr.data = self.base_ptrs[i] + arr.strides[1] * start
 *             arr.shape[1] = end - start             # <<<<<<<<<<<<<<
 * 
 *         self.idx_slider.move(start, end)
 */
    (__pyx_v_arr->dimensions[1]) = (__pyx_v_end - __pyx_v_start);
  }

  /* "pandas/src/reduce.pyx":574
 *             arr.shape[1] = end - start
 * 
 *         self.idx_slider.move(start, end)             # <<<<<<<<<<<<<<
 * 
 *     cdef reset(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->idx_slider->__pyx_vtab)->move(__pyx_v_self->idx_slider, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_start;
  int __pyx_v_end;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("move (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "move") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_start = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_end = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_4move(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":562
 *         free(self.base_ptrs)
 * 
 *     cpdef move(self, int start, int end):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr
 */

static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_4move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("move", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_self->__pyx_vtab)->move(__pyx_v_self, __pyx_v_start, __pyx_v_end, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __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.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":576
 *         self.idx_slider.move(start, end)
 * 
 *     cdef reset(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr
 */

static PyObject *__pyx_f_6pandas_3lib_11BlockSlider_reset(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "pandas/src/reduce.pyx":581
 * 
 *         # move blocks
 *         for i in range(self.nblocks):             # <<<<<<<<<<<<<<
 *             arr = self.blocks[i]
 * 
 */
  __pyx_t_1 = __pyx_v_self->nblocks;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pandas/src/reduce.pyx":582
 *         # move blocks
 *         for i in range(self.nblocks):
 *             arr = self.blocks[i]             # <<<<<<<<<<<<<<
 * 
 *             # axis=1 is the frame's axis=0
 */
    if (unlikely(((PyObject *)__pyx_v_self->blocks) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->blocks), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __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[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pandas/src/reduce.pyx":585
 * 
 *             # axis=1 is the frame's axis=0
 *             arr.data = self.base_ptrs[i]             # <<<<<<<<<<<<<<
 *             arr.shape[1] = 0
 * 
 */
    __pyx_v_arr->data = (__pyx_v_self->base_ptrs[__pyx_v_i]);

    /* "pandas/src/reduce.pyx":586
 *             # axis=1 is the frame's axis=0
 *             arr.data = self.base_ptrs[i]
 *             arr.shape[1] = 0             # <<<<<<<<<<<<<<
 * 
 *         self.idx_slider.reset()
 */
    (__pyx_v_arr->dimensions[1]) = 0;
  }

  /* "pandas/src/reduce.pyx":588
 *             arr.shape[1] = 0
 * 
 *         self.idx_slider.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->idx_slider->__pyx_vtab)->reset(__pyx_v_self->idx_slider, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.lib.BlockSlider.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":535
 * 
 *     cdef public:
 *         object frame, dummy             # <<<<<<<<<<<<<<
 *         int nblocks
 *         Slider idx_slider
 */

static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->frame);
  __pyx_r = __pyx_v_self->frame;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->frame);
  __Pyx_DECREF(__pyx_v_self->frame);
  __pyx_v_self->frame = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->frame);
  __Pyx_DECREF(__pyx_v_self->frame);
  __pyx_v_self->frame = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dummy);
  __pyx_r = __pyx_v_self->dummy;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":536
 *     cdef public:
 *         object frame, dummy
 *         int nblocks             # <<<<<<<<<<<<<<
 *         Slider idx_slider
 *         list blocks
 */

static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->nblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __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.lib.BlockSlider.nblocks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->nblocks = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":537
 *         object frame, dummy
 *         int nblocks
 *         Slider idx_slider             # <<<<<<<<<<<<<<
 *         list blocks
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->idx_slider));
  __pyx_r = ((PyObject *)__pyx_v_self->idx_slider);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_3lib_Slider))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->idx_slider);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider));
  __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_value);

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->idx_slider);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider));
  __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None);

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/reduce.pyx":538
 *         int nblocks
 *         Slider idx_slider
 *         list blocks             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->blocks));
  __pyx_r = ((PyObject *)__pyx_v_self->blocks);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  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[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->blocks);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks));
  __pyx_v_self->blocks = ((PyObject*)__pyx_v_value);

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->blocks);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks));
  __pyx_v_self->blocks = ((PyObject*)Py_None);

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_103reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_103reduce = {__Pyx_NAMESTR("reduce"), (PyCFunction)__pyx_pw_6pandas_3lib_103reduce, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_103reduce(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_labels = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reduce (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,&__pyx_n_s__labels,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_0);

    /* "pandas/src/reduce.pyx":591
 * 
 * 
 * def reduce(arr, f, axis=0, dummy=None, labels=None):             # <<<<<<<<<<<<<<
 *     if labels._has_complex_internals:
 *         raise Exception('Cannot use shortcut')
 */
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __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--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduce") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_f = values[1];
    __pyx_v_axis = values[2];
    __pyx_v_dummy = values[3];
    __pyx_v_labels = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_102reduce(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy, __pyx_v_labels);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_102reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels) {
  struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_reducer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reduce", 0);

  /* "pandas/src/reduce.pyx":592
 * 
 * def reduce(arr, f, axis=0, dummy=None, labels=None):
 *     if labels._has_complex_internals:             # <<<<<<<<<<<<<<
 *         raise Exception('Cannot use shortcut')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_labels, __pyx_n_s_37); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __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[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":593
 * def reduce(arr, f, axis=0, dummy=None, labels=None):
 *     if labels._has_complex_internals:
 *         raise Exception('Cannot use shortcut')             # <<<<<<<<<<<<<<
 * 
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":595
 *         raise Exception('Cannot use shortcut')
 * 
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels)             # <<<<<<<<<<<<<<
 *     return reducer.get_result()
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  __Pyx_INCREF(__pyx_v_f);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __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_v_axis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dummy), __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__labels), __pyx_v_labels) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Reducer)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_reducer = ((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/src/reduce.pyx":596
 * 
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels)
 *     return reducer.get_result()             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_reducer), __pyx_n_s__get_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.lib.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reducer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_allow_setting = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__allow_setting,0};
    PyObject* values[2] = {0,0};

    /* "pandas/src/properties.pyx":9
 *         object func, name, allow_setting
 * 
 *     def __init__(self, func=None, allow_setting=False):             # <<<<<<<<<<<<<<
 *         if func is not None:
 *             self.func = func
 */
    values[0] = ((PyObject *)Py_None);
    values[1] = __pyx_k_46;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__allow_setting);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_allow_setting = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly___init__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), __pyx_v_func, __pyx_v_allow_setting);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_14cache_readonly___init__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_allow_setting) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/src/properties.pyx":10
 * 
 *     def __init__(self, func=None, allow_setting=False):
 *         if func is not None:             # <<<<<<<<<<<<<<
 *             self.func = func
 *             self.name = func.__name__
 */
  __pyx_t_1 = (__pyx_v_func != Py_None);
  if (__pyx_t_1) {

    /* "pandas/src/properties.pyx":11
 *     def __init__(self, func=None, allow_setting=False):
 *         if func is not None:
 *             self.func = func             # <<<<<<<<<<<<<<
 *             self.name = func.__name__
 *         self.allow_setting = allow_setting
 */
    __Pyx_INCREF(__pyx_v_func);
    __Pyx_GIVEREF(__pyx_v_func);
    __Pyx_GOTREF(__pyx_v_self->func);
    __Pyx_DECREF(__pyx_v_self->func);
    __pyx_v_self->func = __pyx_v_func;

    /* "pandas/src/properties.pyx":12
 *         if func is not None:
 *             self.func = func
 *             self.name = func.__name__             # <<<<<<<<<<<<<<
 *         self.allow_setting = allow_setting
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_func, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->name);
    __Pyx_DECREF(__pyx_v_self->name);
    __pyx_v_self->name = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":13
 *             self.func = func
 *             self.name = func.__name__
 *         self.allow_setting = allow_setting             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, func, doc=None):
 */
  __Pyx_INCREF(__pyx_v_allow_setting);
  __Pyx_GIVEREF(__pyx_v_allow_setting);
  __Pyx_GOTREF(__pyx_v_self->allow_setting);
  __Pyx_DECREF(__pyx_v_self->allow_setting);
  __pyx_v_self->allow_setting = __pyx_v_allow_setting;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  CYTHON_UNUSED PyObject *__pyx_v_doc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__doc,0};
    PyObject* values[2] = {0,0};

    /* "pandas/src/properties.pyx":15
 *         self.allow_setting = allow_setting
 * 
 *     def __call__(self, func, doc=None):             # <<<<<<<<<<<<<<
 *         self.func = func
 *         self.name = func.__name__
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__doc);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_doc = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.cache_readonly.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_2__call__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), __pyx_v_func, __pyx_v_doc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_2__call__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, CYTHON_UNUSED PyObject *__pyx_v_doc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "pandas/src/properties.pyx":16
 * 
 *     def __call__(self, func, doc=None):
 *         self.func = func             # <<<<<<<<<<<<<<
 *         self.name = func.__name__
 *         return self
 */
  __Pyx_INCREF(__pyx_v_func);
  __Pyx_GIVEREF(__pyx_v_func);
  __Pyx_GOTREF(__pyx_v_self->func);
  __Pyx_DECREF(__pyx_v_self->func);
  __pyx_v_self->func = __pyx_v_func;

  /* "pandas/src/properties.pyx":17
 *     def __call__(self, func, doc=None):
 *         self.func = func
 *         self.name = func.__name__             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_func, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/properties.pyx":18
 *         self.func = func
 *         self.name = func.__name__
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, typ):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  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.lib.cache_readonly.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_5__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_typ); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_5__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_typ) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4__get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_typ));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":20
 *         return self
 * 
 *     def __get__(self, obj, typ):             # <<<<<<<<<<<<<<
 *         # Get the cache or set a default one if needed
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4__get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_typ) {
  PyObject *__pyx_v_cache = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/src/properties.pyx":23
 *         # Get the cache or set a default one if needed
 * 
 *         cache = getattr(obj, '_cache', None)             # <<<<<<<<<<<<<<
 *         if cache is None:
 *             try:
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_s___cache);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = Py_None;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; __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_v_cache = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/properties.pyx":24
 * 
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:             # <<<<<<<<<<<<<<
 *             try:
 *                 cache = obj._cache = {}
 */
  __pyx_t_4 = (__pyx_v_cache == Py_None);
  if (__pyx_t_4) {

    /* "pandas/src/properties.pyx":25
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 cache = obj._cache = {}
 *             except (AttributeError):
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "pandas/src/properties.pyx":26
 *         if cache is None:
 *             try:
 *                 cache = obj._cache = {}             # <<<<<<<<<<<<<<
 *             except (AttributeError):
 *                 return
 */
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_INCREF(((PyObject *)__pyx_t_3));
        __Pyx_DECREF(__pyx_v_cache);
        __pyx_v_cache = ((PyObject *)__pyx_t_3);
        if (PyObject_SetAttr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      }
      __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;
      goto __pyx_L11_try_end;
      __pyx_L4_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;

      /* "pandas/src/properties.pyx":27
 *             try:
 *                 cache = obj._cache = {}
 *             except (AttributeError):             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("pandas.lib.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_1);

        /* "pandas/src/properties.pyx":28
 *                 cache = obj._cache = {}
 *             except (AttributeError):
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         if PyDict_Contains(cache, self.name):
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __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_L7_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_L5_exception_handled;
      }
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L0;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L11_try_end:;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":30
 *                 return
 * 
 *         if PyDict_Contains(cache, self.name):             # <<<<<<<<<<<<<<
 *             # not necessary to Py_INCREF
 *             val = <object> PyDict_GetItem(cache, self.name)
 */
  __pyx_t_1 = __pyx_v_self->name;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8 = PyDict_Contains(__pyx_v_cache, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "pandas/src/properties.pyx":32
 *         if PyDict_Contains(cache, self.name):
 *             # not necessary to Py_INCREF
 *             val = <object> PyDict_GetItem(cache, self.name)             # <<<<<<<<<<<<<<
 *         else:
 *             val = self.func(obj)
 */
    __pyx_t_1 = __pyx_v_self->name;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9 = PyDict_GetItem(__pyx_v_cache, __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_t_9));
    __pyx_v_val = ((PyObject *)__pyx_t_9);
    goto __pyx_L14;
  }
  /*else*/ {

    /* "pandas/src/properties.pyx":34
 *             val = <object> PyDict_GetItem(cache, self.name)
 *         else:
 *             val = self.func(obj)             # <<<<<<<<<<<<<<
 *             PyDict_SetItem(cache, self.name, val)
 *         return val
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    __pyx_t_2 = PyObject_Call(__pyx_v_self->func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/properties.pyx":35
 *         else:
 *             val = self.func(obj)
 *             PyDict_SetItem(cache, self.name, val)             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
    __pyx_t_2 = __pyx_v_self->name;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_8 = PyDict_SetItem(__pyx_v_cache, __pyx_t_2, __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L14:;

  /* "pandas/src/properties.pyx":36
 *             val = self.func(obj)
 *             PyDict_SetItem(cache, self.name, val)
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def __set__(self, obj, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  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.lib.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":38
 *         return val
 * 
 *     def __set__(self, obj, value):             # <<<<<<<<<<<<<<
 * 
 *         if not self.allow_setting:
 */

static int __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_cache = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pandas/src/properties.pyx":40
 *     def __set__(self, obj, value):
 * 
 *         if not self.allow_setting:             # <<<<<<<<<<<<<<
 *             raise Exception("cannot set values for [%s]" % self.name)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->allow_setting); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "pandas/src/properties.pyx":41
 * 
 *         if not self.allow_setting:
 *             raise Exception("cannot set values for [%s]" % self.name)             # <<<<<<<<<<<<<<
 * 
 *         # Get the cache or set a default one if needed
 */
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_v_self->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":44
 * 
 *         # Get the cache or set a default one if needed
 *         cache = getattr(obj, '_cache', None)             # <<<<<<<<<<<<<<
 *         if cache is None:
 *             try:
 */
  __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_v_obj, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_cache = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/properties.pyx":45
 *         # Get the cache or set a default one if needed
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:             # <<<<<<<<<<<<<<
 *             try:
 *                 cache = obj._cache = {}
 */
  __pyx_t_2 = (__pyx_v_cache == Py_None);
  if (__pyx_t_2) {

    /* "pandas/src/properties.pyx":46
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 cache = obj._cache = {}
 *             except (AttributeError):
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "pandas/src/properties.pyx":47
 *         if cache is None:
 *             try:
 *                 cache = obj._cache = {}             # <<<<<<<<<<<<<<
 *             except (AttributeError):
 *                 return
 */
        __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_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 = 47; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(((PyObject *)__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_8); __pyx_t_8 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/src/properties.pyx":48
 *             try:
 *                 cache = obj._cache = {}
 *             except (AttributeError):             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("pandas.lib.cache_readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_3);

        /* "pandas/src/properties.pyx":49
 *                 cache = obj._cache = {}
 *             except (AttributeError):
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         PyDict_SetItem(cache, self.name, value)
 */
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L8_except_return;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L6_exception_handled;
      }
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L8_except_return:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L0;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L12_try_end:;
    }
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/properties.pyx":51
 *                 return
 * 
 *         PyDict_SetItem(cache, self.name, value)             # <<<<<<<<<<<<<<
 * 
 * cdef class AxisProperty(object):
 */
  __pyx_t_3 = __pyx_v_self->name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_9 = PyDict_SetItem(__pyx_v_cache, __pyx_t_3, __pyx_v_value); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.lib.cache_readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":7
 * 
 *     cdef readonly:
 *         object func, name, allow_setting             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, func=None, allow_setting=False):
 */

static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->func);
  __pyx_r = __pyx_v_self->func;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->allow_setting);
  __pyx_r = __pyx_v_self->allow_setting;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_axis = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__axis,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_axis = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty___init__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), __pyx_v_axis);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":57
 *         Py_ssize_t axis
 * 
 *     def __init__(self, axis=0):             # <<<<<<<<<<<<<<
 *         self.axis = axis
 * 
 */

static int __pyx_pf_6pandas_3lib_12AxisProperty___init__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/src/properties.pyx":58
 * 
 *     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 = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->axis = __pyx_t_1;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty_2__get__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":60
 *         self.axis = axis
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         cdef list axes = obj._data.axes
 *         return axes[self.axis]
 */

static PyObject *__pyx_pf_6pandas_3lib_12AxisProperty_2__get__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyObject *__pyx_v_axes = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/src/properties.pyx":61
 * 
 *     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 = 61; __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 = 61; __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 = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_axes = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/properties.pyx":62
 *     def __get__(self, obj, type):
 *         cdef list axes = obj._data.axes
 *         return axes[self.axis]             # <<<<<<<<<<<<<<
 * 
 *     def __set__(self, obj, value):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_axes) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_axes), __pyx_v_self->axis, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __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.lib.AxisProperty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_axes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":64
 *         return axes[self.axis]
 * 
 *     def __set__(self, obj, value):             # <<<<<<<<<<<<<<
 *         obj._set_axis(self.axis, value)
 */

static int __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pandas/src/properties.pyx":65
 * 
 *     def __set__(self, obj, value):
 *         obj._set_axis(self.axis, value)             # <<<<<<<<<<<<<<
 */
  __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 = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->axis); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __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 = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __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.lib.AxisProperty.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_105infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_105infer_dtype = {__Pyx_NAMESTR("infer_dtype"), (PyCFunction)__pyx_pw_6pandas_3lib_105infer_dtype, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_105infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("infer_dtype (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_104infer_dtype(__pyx_self, ((PyObject *)__pyx_v__values));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":33
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_3lib_104infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val_kind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("infer_dtype", 0);
  __Pyx_INCREF(__pyx_v__values);

  /* "pandas/src/inference.pyx":39
 *         ndarray values
 * 
 *     if isinstance(_values, np.ndarray):             # <<<<<<<<<<<<<<
 *         values = _values
 *     elif hasattr(_values,'values'):
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__values, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":40
 * 
 *     if isinstance(_values, np.ndarray):
 *         values = _values             # <<<<<<<<<<<<<<
 *     elif hasattr(_values,'values'):
 *         values = _values.values
 */
    if (!(likely(((__pyx_v__values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v__values);
    __pyx_v_values = ((PyArrayObject *)__pyx_v__values);
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":41
 *     if isinstance(_values, np.ndarray):
 *         values = _values
 *     elif hasattr(_values,'values'):             # <<<<<<<<<<<<<<
 *         values = _values.values
 *     else:
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_s__values);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_HasAttr(__pyx_v__values, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":42
 *         values = _values
 *     elif hasattr(_values,'values'):
 *         values = _values.values             # <<<<<<<<<<<<<<
 *     else:
 *         if not isinstance(_values, list):
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v__values, __pyx_n_s__values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __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[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":44
 *         values = _values.values
 *     else:
 *         if not isinstance(_values, list):             # <<<<<<<<<<<<<<
 *             _values = list(_values)
 *         values = list_to_object_array(_values)
 */
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyList_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__values, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (!__pyx_t_2);
    if (__pyx_t_3) {

      /* "pandas/src/inference.pyx":45
 *     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 = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v__values);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__values);
      __Pyx_GIVEREF(__pyx_v__values);
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v__values);
      __pyx_v__values = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":46
 *         if not isinstance(_values, list):
 *             _values = list(_values)
 *         values = list_to_object_array(_values)             # <<<<<<<<<<<<<<
 * 
 *     val_kind = values.dtype.type
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_48); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__values);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__values);
    __Pyx_GIVEREF(__pyx_v__values);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_values = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":48
 *         values = list_to_object_array(_values)
 * 
 *     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 = 48; __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 = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_val_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":49
 * 
 *     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 = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_val_kind, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/inference.pyx":50
 *     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 = 50; __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 = 50; __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_L5;
  }
  __pyx_L5:;

  /* "pandas/src/inference.pyx":52
 *         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 = 52; __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 = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__object_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/inference.pyx":53
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
    __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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/src/inference.pyx":55
 *         values = values.astype('O')
 * 
 *     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 = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_6;

  /* "pandas/src/inference.pyx":56
 * 
 *     n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return 'empty'
 * 
 */
  __pyx_t_3 = (__pyx_v_n == 0);
  if (__pyx_t_3) {

    /* "pandas/src/inference.pyx":57
 *     n = len(values)
 *     if n == 0:
 *         return 'empty'             # <<<<<<<<<<<<<<
 * 
 *     # make contiguous
 */
    __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:;

  /* "pandas/src/inference.pyx":60
 * 
 *     # make contiguous
 *     values = values.ravel()             # <<<<<<<<<<<<<<
 * 
 *     # try to use a valid value
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__ravel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_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[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_values));
  __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":63
 * 
 *     # try to use a valid value
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *        val = util.get_value_1d(values, i)
 *        if not is_null_datetimelike(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;

    /* "pandas/src/inference.pyx":64
 *     # try to use a valid value
 *     for i in range(n):
 *        val = util.get_value_1d(values, i)             # <<<<<<<<<<<<<<
 *        if not is_null_datetimelike(val):
 *            break
 */
    __pyx_t_1 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/src/inference.pyx":65
 *     for i in range(n):
 *        val = util.get_value_1d(values, i)
 *        if not is_null_datetimelike(val):             # <<<<<<<<<<<<<<
 *            break
 * 
 */
    __pyx_t_3 = (!__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_val));
    if (__pyx_t_3) {

      /* "pandas/src/inference.pyx":66
 *        val = util.get_value_1d(values, i)
 *        if not is_null_datetimelike(val):
 *            break             # <<<<<<<<<<<<<<
 * 
 *     if util.is_datetime64_object(val) or val is NaT:
 */
      goto __pyx_L9_break;
      goto __pyx_L10;
    }
    __pyx_L10:;
  }
  __pyx_L9_break:;

  /* "pandas/src/inference.pyx":68
 *            break
 * 
 *     if util.is_datetime64_object(val) or val is NaT:             # <<<<<<<<<<<<<<
 *         if is_datetime64_array(values):
 *             return 'datetime64'
 */
  if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (!is_datetime64_object(__pyx_v_val)) {
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__pyx_v_val == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_3;
  } else {
    __pyx_t_2 = is_datetime64_object(__pyx_v_val);
  }
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":69
 * 
 *     if util.is_datetime64_object(val) or val is NaT:
 *         if is_datetime64_array(values):             # <<<<<<<<<<<<<<
 *             return 'datetime64'
 *         elif is_timedelta_or_timedelta64_array(values):
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_datetime64_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":70
 *     if util.is_datetime64_object(val) or val is NaT:
 *         if is_datetime64_array(values):
 *             return 'datetime64'             # <<<<<<<<<<<<<<
 *         elif is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime64));
      __pyx_r = ((PyObject *)__pyx_n_s__datetime64);
      goto __pyx_L0;
      goto __pyx_L12;
    }

    /* "pandas/src/inference.pyx":71
 *         if is_datetime64_array(values):
 *             return 'datetime64'
 *         elif is_timedelta_or_timedelta64_array(values):             # <<<<<<<<<<<<<<
 *             return 'timedelta'
 * 
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_50); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":72
 *             return 'datetime64'
 *         elif is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'             # <<<<<<<<<<<<<<
 * 
 *     elif util.is_integer_object(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
      __pyx_r = ((PyObject *)__pyx_n_s__timedelta);
      goto __pyx_L0;
      goto __pyx_L12;
    }
    __pyx_L12:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":74
 *             return 'timedelta'
 * 
 *     elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *         # a timedelta will show true here as well
 *         if is_timedelta(val):
 */
  __pyx_t_8 = is_integer_object(__pyx_v_val);
  if (__pyx_t_8) {

    /* "pandas/src/inference.pyx":76
 *     elif util.is_integer_object(val):
 *         # a timedelta will show true here as well
 *         if is_timedelta(val):             # <<<<<<<<<<<<<<
 *             if is_timedelta_or_timedelta64_array(values):
 *                 return 'timedelta'
 */
    __pyx_t_2 = __pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":77
 *         # a timedelta will show true here as well
 *         if is_timedelta(val):
 *             if is_timedelta_or_timedelta64_array(values):             # <<<<<<<<<<<<<<
 *                 return 'timedelta'
 * 
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_50); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __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 = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(((PyObject *)__pyx_v_values));
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); 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_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_2) {

        /* "pandas/src/inference.pyx":78
 *         if is_timedelta(val):
 *             if is_timedelta_or_timedelta64_array(values):
 *                 return 'timedelta'             # <<<<<<<<<<<<<<
 * 
 *         if is_integer_array(values):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
        __pyx_r = ((PyObject *)__pyx_n_s__timedelta);
        goto __pyx_L0;
        goto __pyx_L14;
      }
      __pyx_L14:;
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "pandas/src/inference.pyx":80
 *                 return 'timedelta'
 * 
 *         if is_integer_array(values):             # <<<<<<<<<<<<<<
 *             return 'integer'
 *         elif is_integer_float_array(values):
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_integer_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __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 = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":81
 * 
 *         if is_integer_array(values):
 *             return 'integer'             # <<<<<<<<<<<<<<
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__integer));
      __pyx_r = ((PyObject *)__pyx_n_s__integer);
      goto __pyx_L0;
      goto __pyx_L15;
    }

    /* "pandas/src/inference.pyx":82
 *         if is_integer_array(values):
 *             return 'integer'
 *         elif is_integer_float_array(values):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer-float'
 *         elif is_timedelta_or_timedelta64_array(values):
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_51); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __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 = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":83
 *             return 'integer'
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'             # <<<<<<<<<<<<<<
 *         elif is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_52));
      __pyx_r = ((PyObject *)__pyx_kp_s_52);
      goto __pyx_L0;
      goto __pyx_L15;
    }

    /* "pandas/src/inference.pyx":84
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'
 *         elif is_timedelta_or_timedelta64_array(values):             # <<<<<<<<<<<<<<
 *             return 'timedelta'
 *         return 'mixed-integer'
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_50); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __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 = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":85
 *             return 'mixed-integer-float'
 *         elif is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'             # <<<<<<<<<<<<<<
 *         return 'mixed-integer'
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
      __pyx_r = ((PyObject *)__pyx_n_s__timedelta);
      goto __pyx_L0;
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "pandas/src/inference.pyx":86
 *         elif is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'
 *         return 'mixed-integer'             # <<<<<<<<<<<<<<
 * 
 *     elif is_datetime(val):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
    __pyx_r = ((PyObject *)__pyx_kp_s_53);
    goto __pyx_L0;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":88
 *         return 'mixed-integer'
 * 
 *     elif is_datetime(val):             # <<<<<<<<<<<<<<
 *         if is_datetime_array(values):
 *             return 'datetime'
 */
  __pyx_t_2 = __pyx_f_6pandas_3lib_is_datetime(__pyx_v_val);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":89
 * 
 *     elif is_datetime(val):
 *         if is_datetime_array(values):             # <<<<<<<<<<<<<<
 *             return 'datetime'
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_datetime_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __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 = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":90
 *     elif is_datetime(val):
 *         if is_datetime_array(values):
 *             return 'datetime'             # <<<<<<<<<<<<<<
 * 
 *     elif is_date(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
      __pyx_r = ((PyObject *)__pyx_n_s__datetime);
      goto __pyx_L0;
      goto __pyx_L16;
    }
    __pyx_L16:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":92
 *             return 'datetime'
 * 
 *     elif is_date(val):             # <<<<<<<<<<<<<<
 *         if is_date_array(values):
 *             return 'date'
 */
  __pyx_t_2 = __pyx_f_6pandas_3lib_is_date(__pyx_v_val);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":93
 * 
 *     elif is_date(val):
 *         if is_date_array(values):             # <<<<<<<<<<<<<<
 *             return 'date'
 * 
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_date_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __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 = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":94
 *     elif is_date(val):
 *         if is_date_array(values):
 *             return 'date'             # <<<<<<<<<<<<<<
 * 
 *     elif is_time(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
      __pyx_r = ((PyObject *)__pyx_n_s__date);
      goto __pyx_L0;
      goto __pyx_L17;
    }
    __pyx_L17:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":96
 *             return 'date'
 * 
 *     elif is_time(val):             # <<<<<<<<<<<<<<
 *         if is_time_array(values):
 *             return 'time'
 */
  __pyx_t_2 = __pyx_f_6pandas_3lib_is_time(__pyx_v_val);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":97
 * 
 *     elif is_time(val):
 *         if is_time_array(values):             # <<<<<<<<<<<<<<
 *             return 'time'
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_time_array); 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 = PyTuple_New(1); 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_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":98
 *     elif is_time(val):
 *         if is_time_array(values):
 *             return 'time'             # <<<<<<<<<<<<<<
 * 
 *     elif util.is_float_object(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__time));
      __pyx_r = ((PyObject *)__pyx_n_s__time);
      goto __pyx_L0;
      goto __pyx_L18;
    }
    __pyx_L18:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":100
 *             return 'time'
 * 
 *     elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *         if is_float_array(values):
 *             return 'floating'
 */
  __pyx_t_8 = is_float_object(__pyx_v_val);
  if (__pyx_t_8) {

    /* "pandas/src/inference.pyx":101
 * 
 *     elif util.is_float_object(val):
 *         if is_float_array(values):             # <<<<<<<<<<<<<<
 *             return 'floating'
 *         elif is_integer_float_array(values):
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_float_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":102
 *     elif util.is_float_object(val):
 *         if is_float_array(values):
 *             return 'floating'             # <<<<<<<<<<<<<<
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__floating));
      __pyx_r = ((PyObject *)__pyx_n_s__floating);
      goto __pyx_L0;
      goto __pyx_L19;
    }

    /* "pandas/src/inference.pyx":103
 *         if is_float_array(values):
 *             return 'floating'
 *         elif is_integer_float_array(values):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer-float'
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_51); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __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 = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":104
 *             return 'floating'
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'             # <<<<<<<<<<<<<<
 * 
 *     elif util.is_bool_object(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_52));
      __pyx_r = ((PyObject *)__pyx_kp_s_52);
      goto __pyx_L0;
      goto __pyx_L19;
    }
    __pyx_L19:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":106
 *             return 'mixed-integer-float'
 * 
 *     elif util.is_bool_object(val):             # <<<<<<<<<<<<<<
 *         if is_bool_array(values):
 *             return 'boolean'
 */
  __pyx_t_8 = is_bool_object(__pyx_v_val);
  if (__pyx_t_8) {

    /* "pandas/src/inference.pyx":107
 * 
 *     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 = 107; __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 = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":108
 *     elif util.is_bool_object(val):
 *         if is_bool_array(values):
 *             return 'boolean'             # <<<<<<<<<<<<<<
 * 
 *     elif PyString_Check(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__boolean));
      __pyx_r = ((PyObject *)__pyx_n_s__boolean);
      goto __pyx_L0;
      goto __pyx_L20;
    }
    __pyx_L20:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":110
 *             return 'boolean'
 * 
 *     elif PyString_Check(val):             # <<<<<<<<<<<<<<
 *         if is_string_array(values):
 *             return 'string'
 */
  __pyx_t_2 = PyString_Check(__pyx_v_val);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":111
 * 
 *     elif PyString_Check(val):
 *         if is_string_array(values):             # <<<<<<<<<<<<<<
 *             return 'string'
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_string_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":112
 *     elif PyString_Check(val):
 *         if is_string_array(values):
 *             return 'string'             # <<<<<<<<<<<<<<
 * 
 *     elif PyUnicode_Check(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__string));
      __pyx_r = ((PyObject *)__pyx_n_s__string);
      goto __pyx_L0;
      goto __pyx_L21;
    }
    __pyx_L21:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":114
 *             return 'string'
 * 
 *     elif PyUnicode_Check(val):             # <<<<<<<<<<<<<<
 *         if is_unicode_array(values):
 *             return 'unicode'
 */
  __pyx_t_2 = PyUnicode_Check(__pyx_v_val);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":115
 * 
 *     elif PyUnicode_Check(val):
 *         if is_unicode_array(values):             # <<<<<<<<<<<<<<
 *             return 'unicode'
 * 
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_unicode_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __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 = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); 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);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__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[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":116
 *     elif PyUnicode_Check(val):
 *         if is_unicode_array(values):
 *             return 'unicode'             # <<<<<<<<<<<<<<
 * 
 *     elif is_timedelta(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__unicode));
      __pyx_r = ((PyObject *)__pyx_n_s__unicode);
      goto __pyx_L0;
      goto __pyx_L22;
    }
    __pyx_L22:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":118
 *             return 'unicode'
 * 
 *     elif is_timedelta(val):             # <<<<<<<<<<<<<<
 *         if is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'
 */
  __pyx_t_2 = __pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":119
 * 
 *     elif is_timedelta(val):
 *         if is_timedelta_or_timedelta64_array(values):             # <<<<<<<<<<<<<<
 *             return 'timedelta'
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_50); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __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 = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":120
 *     elif is_timedelta(val):
 *         if is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'             # <<<<<<<<<<<<<<
 * 
 *     elif is_period(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
      __pyx_r = ((PyObject *)__pyx_n_s__timedelta);
      goto __pyx_L0;
      goto __pyx_L23;
    }
    __pyx_L23:;
    goto __pyx_L11;
  }

  /* "pandas/src/inference.pyx":122
 *             return 'timedelta'
 * 
 *     elif is_period(val):             # <<<<<<<<<<<<<<
 *         if is_period_array(values):
 *             return 'period'
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_period); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __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 = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __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 = 122; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":123
 * 
 *     elif is_period(val):
 *         if is_period_array(values):             # <<<<<<<<<<<<<<
 *             return 'period'
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_period_array); 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_t_4 = PyTuple_New(1); 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_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":124
 *     elif is_period(val):
 *         if is_period_array(values):
 *             return 'period'             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__period));
      __pyx_r = ((PyObject *)__pyx_n_s__period);
      goto __pyx_L0;
      goto __pyx_L24;
    }
    __pyx_L24:;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "pandas/src/inference.pyx":126
 *             return 'period'
 * 
 *     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;

    /* "pandas/src/inference.pyx":127
 * 
 *     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 = 127; __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;

    /* "pandas/src/inference.pyx":128
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)
 *         if util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer'
 * 
 */
    __pyx_t_8 = is_integer_object(__pyx_v_val);
    if (__pyx_t_8) {

      /* "pandas/src/inference.pyx":129
 *         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_53));
      __pyx_r = ((PyObject *)__pyx_kp_s_53);
      goto __pyx_L0;
      goto __pyx_L27;
    }
    __pyx_L27:;
  }

  /* "pandas/src/inference.pyx":131
 *             return 'mixed-integer'
 * 
 *     return 'mixed'             # <<<<<<<<<<<<<<
 * 
 * def infer_dtype_list(list values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mixed));
  __pyx_r = ((PyObject *)__pyx_n_s__mixed);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.lib.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_val_kind);
  __Pyx_XDECREF(__pyx_v__values);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_107infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_107infer_dtype_list = {__Pyx_NAMESTR("infer_dtype_list"), (PyCFunction)__pyx_pw_6pandas_3lib_107infer_dtype_list, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_107infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("infer_dtype_list (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_106infer_dtype_list(__pyx_self, ((PyObject*)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":133
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_106infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("infer_dtype_list", 0);

  /* "pandas/src/inference.pyx":135
 * def infer_dtype_list(list values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

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

/* "pandas/src/inference.pyx":139
 * 
 * 
 * cdef inline bint is_null_datetimelike(v):             # <<<<<<<<<<<<<<
 *     return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_null_datetimelike(PyObject *__pyx_v_v) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_null_datetimelike", 0);

  /* "pandas/src/inference.pyx":140
 * 
 * cdef inline bint is_null_datetimelike(v):
 *     return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_datetime(object o):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_v)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __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[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = PyInt_FromLong(is_integer_object(__pyx_v_v)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __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[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_v, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __pyx_t_4 = __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[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = (__pyx_v_v == __pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

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

/* "pandas/src/inference.pyx":142
 *     return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT
 * 
 * cdef inline bint is_datetime(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_Check(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_datetime(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime", 0);

  /* "pandas/src/inference.pyx":143
 * 
 * cdef inline bint is_datetime(object o):
 *     return PyDateTime_Check(o)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_date(object o):
 */
  __pyx_r = PyDateTime_Check(__pyx_v_o);
  goto __pyx_L0;

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

/* "pandas/src/inference.pyx":145
 *     return PyDateTime_Check(o)
 * 
 * cdef inline bint is_date(object o):             # <<<<<<<<<<<<<<
 *     return PyDate_Check(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_date(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_date", 0);

  /* "pandas/src/inference.pyx":146
 * 
 * cdef inline bint is_date(object o):
 *     return PyDate_Check(o)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_time(object o):
 */
  __pyx_r = PyDate_Check(__pyx_v_o);
  goto __pyx_L0;

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

/* "pandas/src/inference.pyx":148
 *     return PyDate_Check(o)
 * 
 * cdef inline bint is_time(object o):             # <<<<<<<<<<<<<<
 *     return PyTime_Check(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_time(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_time", 0);

  /* "pandas/src/inference.pyx":149
 * 
 * cdef inline bint is_time(object o):
 *     return PyTime_Check(o)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_timedelta(object o):
 */
  __pyx_r = PyTime_Check(__pyx_v_o);
  goto __pyx_L0;

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

/* "pandas/src/inference.pyx":151
 *     return PyTime_Check(o)
 * 
 * cdef inline bint is_timedelta(object o):             # <<<<<<<<<<<<<<
 *     return PyDelta_Check(o) or util.is_timedelta64_object(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_timedelta(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timedelta", 0);

  /* "pandas/src/inference.pyx":152
 * 
 * cdef inline bint is_timedelta(object o):
 *     return PyDelta_Check(o) or util.is_timedelta64_object(o)             # <<<<<<<<<<<<<<
 * 
 * def is_bool_array(ndarray values):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(PyDelta_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __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[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = PyInt_FromLong(is_timedelta64_object(__pyx_v_o)); 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_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_109is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_109is_bool_array = {__Pyx_NAMESTR("is_bool_array"), (PyCFunction)__pyx_pw_6pandas_3lib_109is_bool_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_109is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_bool_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_108is_bool_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":154
 *     return PyDelta_Check(o) or util.is_timedelta64_object(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_108is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_bool_array", 0);
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "pandas/src/inference.pyx":156
 * def is_bool_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":160
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.bool_):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __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) {

    /* "pandas/src/inference.pyx":161
 * 
 *     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 = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":162
 *     if issubclass(values.dtype.type, np.bool_):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __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 = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/src/inference.pyx":163
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":165
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":166
 * 
 *         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 = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":168
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_bool_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/src/inference.pyx":169
 * 
 *         for i in range(n):
 *             if not util.is_bool_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!is_bool_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pandas/src/inference.pyx":170
 *         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 = 170; __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/inference.pyx":171
 *             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 = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":173
 *         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 = 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;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_111is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_111is_integer = {__Pyx_NAMESTR("is_integer"), (PyCFunction)__pyx_pw_6pandas_3lib_111is_integer, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_111is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_110is_integer(__pyx_self, ((PyObject *)__pyx_v_o));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":175
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_110is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_integer", 0);

  /* "pandas/src/inference.pyx":176
 * 
 * def is_integer(object o):
 *     return util.is_integer_object(o)             # <<<<<<<<<<<<<<
 * 
 * def is_integer_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(is_integer_object(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __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.lib.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_113is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_113is_integer_array = {__Pyx_NAMESTR("is_integer_array"), (PyCFunction)__pyx_pw_6pandas_3lib_113is_integer_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_113is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_112is_integer_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":178
 *     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_3lib_112is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_integer_array", 0);
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "pandas/src/inference.pyx":180
 * def is_integer_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":184
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.integer):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __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) {

    /* "pandas/src/inference.pyx":185
 * 
 *     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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":186
 *     if issubclass(values.dtype.type, np.integer):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __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 = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/src/inference.pyx":187
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":189
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":190
 * 
 *         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 = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":192
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_integer_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/src/inference.pyx":193
 * 
 *         for i in range(n):
 *             if not util.is_integer_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!is_integer_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pandas/src/inference.pyx":194
 *         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 = 194; __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/inference.pyx":195
 *             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 = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":197
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def is_integer_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 = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_115is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_115is_integer_float_array = {__Pyx_NAMESTR("is_integer_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_115is_integer_float_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_115is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer_float_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_114is_integer_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":199
 *         return False
 * 
 * def is_integer_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_114is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_integer_float_array", 0);
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "pandas/src/inference.pyx":201
 * def is_integer_float_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":205
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.integer):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __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) {

    /* "pandas/src/inference.pyx":206
 * 
 *     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 = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":207
 *     if issubclass(values.dtype.type, np.integer):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/src/inference.pyx":208
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":210
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":211
 * 
 *         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 = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":213
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not (util.is_integer_object(objbuf[i]) or
 *                     util.is_float_object(objbuf[i])):
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/src/inference.pyx":214
 * 
 *         for i in range(n):
 *             if not (util.is_integer_object(objbuf[i]) or             # <<<<<<<<<<<<<<
 *                     util.is_float_object(objbuf[i])):
 * 
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = is_integer_object(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_6) {

        /* "pandas/src/inference.pyx":215
 *         for i in range(n):
 *             if not (util.is_integer_object(objbuf[i]) or
 *                     util.is_float_object(objbuf[i])):             # <<<<<<<<<<<<<<
 * 
 *                 return False
 */
        __pyx_t_12 = __pyx_v_i;
        __pyx_t_13 = -1;
        if (__pyx_t_12 < 0) {
          __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_13 = 0;
        if (unlikely(__pyx_t_13 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_13);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_3);
        __pyx_t_13 = is_float_object(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __pyx_t_13;
      } else {
        __pyx_t_5 = __pyx_t_6;
      }
      __pyx_t_14 = (!__pyx_t_5);
      if (__pyx_t_14) {

        /* "pandas/src/inference.pyx":217
 *                     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 = 217; __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/inference.pyx":218
 * 
 *                 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 = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":220
 *         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 = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_117is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_117is_float_array = {__Pyx_NAMESTR("is_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_117is_float_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_117is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_float_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_116is_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":222
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_116is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_float_array", 0);
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "pandas/src/inference.pyx":224
 * def is_float_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":228
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.floating):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__floating); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __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) {

    /* "pandas/src/inference.pyx":229
 * 
 *     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 = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":230
 *     if issubclass(values.dtype.type, np.floating):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __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 = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/src/inference.pyx":231
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":233
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":234
 * 
 *         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 = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":236
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_float_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/src/inference.pyx":237
 * 
 *         for i in range(n):
 *             if not util.is_float_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!is_float_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pandas/src/inference.pyx":238
 *         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 = 238; __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/inference.pyx":239
 *             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 = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":241
 *         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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_119is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_119is_string_array = {__Pyx_NAMESTR("is_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_119is_string_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_119is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_string_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_118is_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":243
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

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

  /* "pandas/src/inference.pyx":245
 * def is_string_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":249
 *         object obj
 * 
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__string_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = PyObject_IsSubclass(__pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":250
 * 
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):
 *         return True             # <<<<<<<<<<<<<<
 *     elif values.dtype == np.object_:
 *         objbuf = values
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":251
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":252
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":254
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = (__pyx_v_n == 0);
    if (__pyx_t_6) {

      /* "pandas/src/inference.pyx":255
 * 
 *         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 = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":257
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not PyString_Check(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "pandas/src/inference.pyx":258
 * 
 *         for i in range(n):
 *             if not PyString_Check(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = (!PyString_Check(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":259
 *         for i in range(n):
 *             if not PyString_Check(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 = 259; __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/inference.pyx":260
 *             if not PyString_Check(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 = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":262
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def is_unicode_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 = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_121is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_121is_unicode_array = {__Pyx_NAMESTR("is_unicode_array"), (PyCFunction)__pyx_pw_6pandas_3lib_121is_unicode_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_121is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_unicode_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_120is_unicode_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":264
 *         return False
 * 
 * def is_unicode_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_120is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_unicode_array", 0);
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "pandas/src/inference.pyx":266
 * def is_unicode_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":270
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.unicode_):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __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) {

    /* "pandas/src/inference.pyx":271
 * 
 *     if issubclass(values.dtype.type, np.unicode_):
 *         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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/inference.pyx":272
 *     if issubclass(values.dtype.type, np.unicode_):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __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 = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/src/inference.pyx":273
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":275
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":276
 * 
 *         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 = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":278
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not PyUnicode_Check(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/src/inference.pyx":279
 * 
 *         for i in range(n):
 *             if not PyUnicode_Check(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!PyUnicode_Check(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pandas/src/inference.pyx":280
 *         for i in range(n):
 *             if not PyUnicode_Check(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 = 280; __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/inference.pyx":281
 *             if not PyUnicode_Check(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 = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":283
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_123is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_123is_datetime_array = {__Pyx_NAMESTR("is_datetime_array"), (PyCFunction)__pyx_pw_6pandas_3lib_123is_datetime_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_123is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_122is_datetime_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":286
 * 
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */

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

  /* "pandas/src/inference.pyx":287
 * 
 * def is_datetime_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     cdef object v
 *     if n == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":289
 *     cdef int i, n = len(values)
 *     cdef object v
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":290
 *     cdef object v
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = values[i]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":291
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = values[i]
 *         if not (is_datetime(v) or is_null_datetimelike(v)):
 */
  __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;

    /* "pandas/src/inference.pyx":292
 *         return False
 *     for i in range(n):
 *         v = values[i]             # <<<<<<<<<<<<<<
 *         if not (is_datetime(v) or is_null_datetimelike(v)):
 *             return False
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":293
 *     for i in range(n):
 *         v = values[i]
 *         if not (is_datetime(v) or is_null_datetimelike(v)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_2 = __pyx_f_6pandas_3lib_is_datetime(__pyx_v_v);
    if (!__pyx_t_2) {
      __pyx_t_8 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v);
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_2;
    }
    __pyx_t_2 = (!__pyx_t_9);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":294
 *         v = values[i]
 *         if not (is_datetime(v) or is_null_datetimelike(v)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 294; __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:;
  }

  /* "pandas/src/inference.pyx":295
 *         if not (is_datetime(v) or is_null_datetimelike(v)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_125is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_125is_datetime64_array = {__Pyx_NAMESTR("is_datetime64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_125is_datetime64_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_125is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime64_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_124is_datetime64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":298
 * 
 * 
 * def is_datetime64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */

static PyObject *__pyx_pf_6pandas_3lib_124is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_datetime64_array", 0);

  /* "pandas/src/inference.pyx":299
 * 
 * def is_datetime64_array(ndarray values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     cdef object v
 *     if n == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":301
 *     cdef int i, n = len(values)
 *     cdef object v
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":302
 *     cdef object v
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = values[i]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":303
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = values[i]
 *         if not (util.is_datetime64_object(v) or is_null_datetimelike(v)):
 */
  __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;

    /* "pandas/src/inference.pyx":304
 *         return False
 *     for i in range(n):
 *         v = values[i]             # <<<<<<<<<<<<<<
 *         if not (util.is_datetime64_object(v) or is_null_datetimelike(v)):
 *             return False
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":305
 *     for i in range(n):
 *         v = values[i]
 *         if not (util.is_datetime64_object(v) or is_null_datetimelike(v)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    if (!is_datetime64_object(__pyx_v_v)) {
      __pyx_t_2 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v);
      __pyx_t_6 = __pyx_t_2;
    } else {
      __pyx_t_6 = is_datetime64_object(__pyx_v_v);
    }
    __pyx_t_2 = (!__pyx_t_6);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":306
 *         v = values[i]
 *         if not (util.is_datetime64_object(v) or is_null_datetimelike(v)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __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:;
  }

  /* "pandas/src/inference.pyx":307
 *         if not (util.is_datetime64_object(v) or is_null_datetimelike(v)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.lib.is_datetime64_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_127is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_127is_timedelta_array = {__Pyx_NAMESTR("is_timedelta_array"), (PyCFunction)__pyx_pw_6pandas_3lib_127is_timedelta_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_127is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_126is_timedelta_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":309
 *     return True
 * 
 * def is_timedelta_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */

static PyObject *__pyx_pf_6pandas_3lib_126is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timedelta_array", 0);

  /* "pandas/src/inference.pyx":310
 * 
 * def is_timedelta_array(ndarray values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     cdef object v
 *     if n == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":312
 *     cdef int i, n = len(values)
 *     cdef object v
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":313
 *     cdef object v
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = values[i]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":314
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = values[i]
 *         if not (PyDelta_Check(v) or is_null_datetimelike(v)):
 */
  __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;

    /* "pandas/src/inference.pyx":315
 *         return False
 *     for i in range(n):
 *         v = values[i]             # <<<<<<<<<<<<<<
 *         if not (PyDelta_Check(v) or is_null_datetimelike(v)):
 *             return False
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":316
 *     for i in range(n):
 *         v = values[i]
 *         if not (PyDelta_Check(v) or is_null_datetimelike(v)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_2 = PyDelta_Check(__pyx_v_v);
    if (!__pyx_t_2) {
      __pyx_t_6 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v);
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_2;
    }
    __pyx_t_2 = (!__pyx_t_7);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":317
 *         v = values[i]
 *         if not (PyDelta_Check(v) or is_null_datetimelike(v)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __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:;
  }

  /* "pandas/src/inference.pyx":318
 *         if not (PyDelta_Check(v) or is_null_datetimelike(v)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta64_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.lib.is_timedelta_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_129is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_129is_timedelta64_array = {__Pyx_NAMESTR("is_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_129is_timedelta64_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_129is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta64_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_128is_timedelta64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":320
 *     return True
 * 
 * def is_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */

static PyObject *__pyx_pf_6pandas_3lib_128is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timedelta64_array", 0);

  /* "pandas/src/inference.pyx":321
 * 
 * def is_timedelta64_array(ndarray values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     cdef object v
 *     if n == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":323
 *     cdef int i, n = len(values)
 *     cdef object v
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":324
 *     cdef object v
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = values[i]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":325
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = values[i]
 *         if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)):
 */
  __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;

    /* "pandas/src/inference.pyx":326
 *         return False
 *     for i in range(n):
 *         v = values[i]             # <<<<<<<<<<<<<<
 *         if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)):
 *             return False
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":327
 *     for i in range(n):
 *         v = values[i]
 *         if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    if (!is_timedelta64_object(__pyx_v_v)) {
      __pyx_t_2 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v);
      __pyx_t_6 = __pyx_t_2;
    } else {
      __pyx_t_6 = is_timedelta64_object(__pyx_v_v);
    }
    __pyx_t_2 = (!__pyx_t_6);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":328
 *         v = values[i]
 *         if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __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:;
  }

  /* "pandas/src/inference.pyx":329
 *         if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.lib.is_timedelta64_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static char __pyx_doc_6pandas_3lib_130is_timedelta_or_timedelta64_array[] = " infer with timedeltas and/or nat/none ";
static PyMethodDef __pyx_mdef_6pandas_3lib_131is_timedelta_or_timedelta64_array = {__Pyx_NAMESTR("is_timedelta_or_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_130is_timedelta_or_timedelta64_array)};
static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta_or_timedelta64_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":331
 *     return True
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     """ infer with timedeltas and/or nat/none """
 *     cdef int i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timedelta_or_timedelta64_array", 0);

  /* "pandas/src/inference.pyx":333
 * def is_timedelta_or_timedelta64_array(ndarray values):
 *     """ infer with timedeltas and/or nat/none """
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     cdef object v
 *     if n == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":335
 *     cdef int i, n = len(values)
 *     cdef object v
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":336
 *     cdef object v
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = values[i]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":337
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = values[i]
 *         if not (is_timedelta(v) or is_null_datetimelike(v)):
 */
  __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;

    /* "pandas/src/inference.pyx":338
 *         return False
 *     for i in range(n):
 *         v = values[i]             # <<<<<<<<<<<<<<
 *         if not (is_timedelta(v) or is_null_datetimelike(v)):
 *             return False
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":339
 *     for i in range(n):
 *         v = values[i]
 *         if not (is_timedelta(v) or is_null_datetimelike(v)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_2 = __pyx_f_6pandas_3lib_is_timedelta(__pyx_v_v);
    if (!__pyx_t_2) {
      __pyx_t_6 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v);
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_2;
    }
    __pyx_t_2 = (!__pyx_t_7);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":340
 *         v = values[i]
 *         if not (is_timedelta(v) or is_null_datetimelike(v)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 340; __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:;
  }

  /* "pandas/src/inference.pyx":341
 *         if not (is_timedelta(v) or is_null_datetimelike(v)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_date_array(ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.lib.is_timedelta_or_timedelta64_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_133is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_133is_date_array = {__Pyx_NAMESTR("is_date_array"), (PyCFunction)__pyx_pw_6pandas_3lib_133is_date_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_133is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_date_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_132is_date_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":343
 *     return True
 * 
 * def is_date_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

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

  /* "pandas/src/inference.pyx":344
 * 
 * def is_date_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":345
 * def is_date_array(ndarray[object] values):
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":346
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not is_date(values[i]):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":347
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not is_date(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;

    /* "pandas/src/inference.pyx":348
 *         return False
 *     for i in range(n):
 *         if not is_date(values[i]):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __pyx_t_2 = (!__pyx_f_6pandas_3lib_is_date(__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":349
 *     for i in range(n):
 *         if not is_date(values[i]):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __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:;
  }

  /* "pandas/src/inference.pyx":350
 *         if not is_date(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_time_array(ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_135is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_135is_time_array = {__Pyx_NAMESTR("is_time_array"), (PyCFunction)__pyx_pw_6pandas_3lib_135is_time_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_135is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_time_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_134is_time_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":352
 *     return True
 * 
 * def is_time_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

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

  /* "pandas/src/inference.pyx":353
 * 
 * def is_time_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":354
 * def is_time_array(ndarray[object] values):
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":355
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not is_time(values[i]):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":356
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not is_time(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;

    /* "pandas/src/inference.pyx":357
 *         return False
 *     for i in range(n):
 *         if not is_time(values[i]):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __pyx_t_2 = (!__pyx_f_6pandas_3lib_is_time(__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":358
 *     for i in range(n):
 *         if not is_time(values[i]):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 358; __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:;
  }

  /* "pandas/src/inference.pyx":359
 *         if not is_time(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_period(object o):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_137is_period(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_137is_period = {__Pyx_NAMESTR("is_period"), (PyCFunction)__pyx_pw_6pandas_3lib_137is_period, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_137is_period(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_period (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_136is_period(__pyx_self, ((PyObject *)__pyx_v_o));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":361
 *     return True
 * 
 * def is_period(object o):             # <<<<<<<<<<<<<<
 *     from pandas import Period
 *     return isinstance(o,Period)
 */

static PyObject *__pyx_pf_6pandas_3lib_136is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_v_Period = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_period", 0);

  /* "pandas/src/inference.pyx":362
 * 
 * def is_period(object o):
 *     from pandas import Period             # <<<<<<<<<<<<<<
 *     return isinstance(o,Period)
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Period));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pandas), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __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__Period);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Period);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_Period = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":363
 * def is_period(object o):
 *     from pandas import Period
 *     return isinstance(o,Period)             # <<<<<<<<<<<<<<
 * 
 * def is_period_array(ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_o, __pyx_v_Period); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __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.lib.is_period", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Period);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_139is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_139is_period_array = {__Pyx_NAMESTR("is_period_array"), (PyCFunction)__pyx_pw_6pandas_3lib_139is_period_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_139is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_period_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_138is_period_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":365
 *     return isinstance(o,Period)
 * 
 * def is_period_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     from pandas.tseries.period import Period
 */

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

  /* "pandas/src/inference.pyx":366
 * 
 * def is_period_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     from pandas.tseries.period import Period
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":367
 * def is_period_array(ndarray[object] values):
 *     cdef int i, n = len(values)
 *     from pandas.tseries.period import Period             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Period));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_54), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__Period);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Period);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_Period = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":369
 *     from pandas.tseries.period import Period
 * 
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_4 = (__pyx_v_n == 0);
  if (__pyx_t_4) {

    /* "pandas/src/inference.pyx":370
 * 
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not isinstance(values[i], Period):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":371
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not isinstance(values[i], Period):
 *             return False
 */
  __pyx_t_5 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/src/inference.pyx":372
 *         return False
 *     for i in range(n):
 *         if not isinstance(values[i], Period):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __pyx_t_4 = PyObject_IsInstance(__pyx_t_3, __pyx_v_Period); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = (!__pyx_t_4);
    if (__pyx_t_9) {

      /* "pandas/src/inference.pyx":373
 *     for i in range(n):
 *         if not isinstance(values[i], Period):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __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:;
  }

  /* "pandas/src/inference.pyx":374
 *         if not isinstance(values[i], Period):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_141maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_140maybe_convert_numeric[] = "\n    Type inference function-- convert strings to numeric (potentially) and\n    convert to proper dtype array\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_141maybe_convert_numeric = {__Pyx_NAMESTR("maybe_convert_numeric"), (PyCFunction)__pyx_pw_6pandas_3lib_141maybe_convert_numeric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_140maybe_convert_numeric)};
static PyObject *__pyx_pw_6pandas_3lib_141maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_na_values = 0;
  PyObject *__pyx_v_convert_empty = 0;
  PyObject *__pyx_v_coerce_numeric = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_convert_numeric (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,&__pyx_n_s__convert_empty,&__pyx_n_s__coerce_numeric,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = __pyx_k_55;
    values[3] = __pyx_k_56;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_empty);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce_numeric);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_numeric") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_na_values = ((PyObject*)values[1]);
    __pyx_v_convert_empty = values[2];
    __pyx_v_coerce_numeric = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __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 = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_140maybe_convert_numeric(__pyx_self, __pyx_v_values, __pyx_v_na_values, __pyx_v_convert_empty, __pyx_v_coerce_numeric);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":383
 * cdef double fINT64_MIN = <double> INT64_MIN
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                           convert_empty=True, coerce_numeric=False):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_3lib_140maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty, PyObject *__pyx_v_coerce_numeric) {
  CYTHON_UNUSED int __pyx_v_status;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_floats = 0;
  PyArrayObject *__pyx_v_complexes = 0;
  PyArrayObject *__pyx_v_ints = 0;
  int __pyx_v_seen_float;
  int __pyx_v_seen_complex;
  PyObject *__pyx_v_val = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fval;
  CYTHON_UNUSED long __pyx_v_seen_int;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_complexes;
  __Pyx_Buffer __pyx_pybuffer_complexes;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_floats;
  __Pyx_Buffer __pyx_pybuffer_floats;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ints;
  __Pyx_Buffer __pyx_pybuffer_ints;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__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;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_float64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __pyx_t_double_complex __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;
  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;
  int __pyx_t_32;
  PyObject *__pyx_t_33 = NULL;
  PyObject *__pyx_t_34 = NULL;
  PyObject *__pyx_t_35 = NULL;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_convert_numeric", 0);
  __pyx_pybuffer_floats.pybuffer.buf = NULL;
  __pyx_pybuffer_floats.refcount = 0;
  __pyx_pybuffernd_floats.data = NULL;
  __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats;
  __pyx_pybuffer_complexes.pybuffer.buf = NULL;
  __pyx_pybuffer_complexes.refcount = 0;
  __pyx_pybuffernd_complexes.data = NULL;
  __pyx_pybuffernd_complexes.rcbuffer = &__pyx_pybuffer_complexes;
  __pyx_pybuffer_ints.pybuffer.buf = NULL;
  __pyx_pybuffer_ints.refcount = 0;
  __pyx_pybuffernd_ints.data = NULL;
  __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":395
 *         ndarray[complex128_t] complexes
 *         ndarray[int64_t] ints
 *         bint seen_float = 0             # <<<<<<<<<<<<<<
 *         bint seen_complex = 0
 *         object val
 */
  __pyx_v_seen_float = 0;

  /* "pandas/src/inference.pyx":396
 *         ndarray[int64_t] ints
 *         bint seen_float = 0
 *         bint seen_complex = 0             # <<<<<<<<<<<<<<
 *         object val
 *         float64_t fval
 */
  __pyx_v_seen_complex = 0;

  /* "pandas/src/inference.pyx":400
 *         float64_t fval
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 * 
 *     floats = np.empty(n, dtype='f8')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":402
 *     n = len(values)
 * 
 *     floats = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 *     complexes = np.empty(n, dtype='c16')
 *     ints = np.empty(n, dtype='i8')
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __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 = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_floats = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":403
 * 
 *     floats = np.empty(n, dtype='f8')
 *     complexes = np.empty(n, dtype='c16')             # <<<<<<<<<<<<<<
 *     ints = np.empty(n, dtype='i8')
 * 
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_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 = 403; __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 = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __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__c16)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo___pyx_t_double_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_v_complexes, &__Pyx_TypeInfo___pyx_t_double_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_complexes.diminfo[0].strides = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_complexes.diminfo[0].shape = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_complexes = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":404
 *     floats = np.empty(n, dtype='f8')
 *     complexes = np.empty(n, dtype='c16')
 *     ints = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     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 = 404; __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 = 404; __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 = 404; __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __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__i8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __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;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_ints = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":406
 *     ints = np.empty(n, dtype='i8')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":407
 * 
 *     for i from 0 <= i < n:
 *         val = values[i]             # <<<<<<<<<<<<<<
 * 
 *         if val in na_values:
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":409
 *         val = values[i]
 * 
 *         if val in na_values:             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1
 */
    __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_na_values), Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_14) {

      /* "pandas/src/inference.pyx":410
 * 
 *         if val in na_values:
 *             floats[i] = complexes[i] = nan             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif util.is_float_object(val):
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan;
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0);

      /* "pandas/src/inference.pyx":411
 *         if val in na_values:
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif util.is_float_object(val):
 *             floats[i] = complexes[i] = val
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":412
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1
 *         elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 */
    __pyx_t_7 = is_float_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":413
 *             seen_float = 1
 *         elif util.is_float_object(val):
 *             floats[i] = complexes[i] = val             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif util.is_integer_object(val):
 */
      __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_17;
      __pyx_t_19 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_19;

      /* "pandas/src/inference.pyx":414
 *         elif util.is_float_object(val):
 *             floats[i] = complexes[i] = val
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif util.is_integer_object(val):
 *             floats[i] = ints[i] = val
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":415
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 *         elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = ints[i] = val
 *             seen_int = 1
 */
    __pyx_t_7 = is_integer_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":416
 *             seen_float = 1
 *         elif util.is_integer_object(val):
 *             floats[i] = ints[i] = val             # <<<<<<<<<<<<<<
 *             seen_int = 1
 *         elif val is None:
 */
      __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_21 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_17;
      __pyx_t_22 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_22 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_ints.diminfo[0].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_22;

      /* "pandas/src/inference.pyx":417
 *         elif util.is_integer_object(val):
 *             floats[i] = ints[i] = val
 *             seen_int = 1             # <<<<<<<<<<<<<<
 *         elif val is None:
 *             floats[i] = complexes[i] = nan
 */
      __pyx_v_seen_int = 1;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":418
 *             floats[i] = ints[i] = val
 *             seen_int = 1
 *         elif val is None:             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1
 */
    __pyx_t_14 = (__pyx_v_val == Py_None);
    if (__pyx_t_14) {

      /* "pandas/src/inference.pyx":419
 *             seen_int = 1
 *         elif val is None:
 *             floats[i] = complexes[i] = nan             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif hasattr(val,'__len__') and len(val) == 0:
 */
      __pyx_t_24 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_24 < 0) {
        __pyx_t_24 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan;
      __pyx_t_25 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_25 < 0) {
        __pyx_t_25 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0);

      /* "pandas/src/inference.pyx":420
 *         elif val is None:
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif hasattr(val,'__len__') and len(val) == 0:
 *             if convert_empty or coerce_numeric:
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":421
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1
 *         elif hasattr(val,'__len__') and len(val) == 0:             # <<<<<<<<<<<<<<
 *             if convert_empty or coerce_numeric:
 *                 floats[i] = complexes[i] = nan
 */
    __pyx_t_2 = ((PyObject *)__pyx_n_s____len__);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_14 = PyObject_HasAttr(__pyx_v_val, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_14) {
      __pyx_t_26 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_27 = (__pyx_t_26 == 0);
      __pyx_t_28 = __pyx_t_27;
    } else {
      __pyx_t_28 = __pyx_t_14;
    }
    if (__pyx_t_28) {

      /* "pandas/src/inference.pyx":422
 *             seen_float = 1
 *         elif hasattr(val,'__len__') and len(val) == 0:
 *             if convert_empty or coerce_numeric:             # <<<<<<<<<<<<<<
 *                 floats[i] = complexes[i] = nan
 *                 seen_float = 1
 */
      __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_v_convert_empty); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_28) {
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_numeric); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_27 = __pyx_t_14;
      } else {
        __pyx_t_27 = __pyx_t_28;
      }
      if (__pyx_t_27) {

        /* "pandas/src/inference.pyx":423
 *         elif hasattr(val,'__len__') and len(val) == 0:
 *             if convert_empty or coerce_numeric:
 *                 floats[i] = complexes[i] = nan             # <<<<<<<<<<<<<<
 *                 seen_float = 1
 *             else:
 */
        __pyx_t_26 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_pybuffernd_floats.diminfo[0].shape;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan;
        __pyx_t_29 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_29 < 0) {
          __pyx_t_29 += __pyx_pybuffernd_complexes.diminfo[0].shape;
          if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0);

        /* "pandas/src/inference.pyx":424
 *             if convert_empty or coerce_numeric:
 *                 floats[i] = complexes[i] = nan
 *                 seen_float = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError('Empty string encountered')
 */
        __pyx_v_seen_float = 1;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":426
 *                 seen_float = 1
 *             else:
 *                 raise ValueError('Empty string encountered')             # <<<<<<<<<<<<<<
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 */
        __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":427
 *             else:
 *                 raise ValueError('Empty string encountered')
 *         elif util.is_complex_object(val):             # <<<<<<<<<<<<<<
 *             complexes[i] = val
 *             seen_complex = 1
 */
    __pyx_t_7 = is_complex_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":428
 *                 raise ValueError('Empty string encountered')
 *         elif util.is_complex_object(val):
 *             complexes[i] = val             # <<<<<<<<<<<<<<
 *             seen_complex = 1
 *         else:
 */
      __pyx_t_19 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_30 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_30 < 0) {
        __pyx_t_30 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_19;

      /* "pandas/src/inference.pyx":429
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 *             seen_complex = 1             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
      __pyx_v_seen_complex = 1;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":431
 *             seen_complex = 1
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 status = floatify(val, &fval)
 *                 floats[i] = fval
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "pandas/src/inference.pyx":432
 *         else:
 *             try:
 *                 status = floatify(val, &fval)             # <<<<<<<<<<<<<<
 *                 floats[i] = fval
 *                 if not seen_float:
 */
          __pyx_t_7 = floatify(__pyx_v_val, (&__pyx_v_fval)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __pyx_v_status = __pyx_t_7;

          /* "pandas/src/inference.pyx":433
 *             try:
 *                 status = floatify(val, &fval)
 *                 floats[i] = fval             # <<<<<<<<<<<<<<
 *                 if not seen_float:
 *                     if '.' in val or fval == INF or fval == NEGINF:
 */
          __pyx_t_31 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_pybuffernd_floats.diminfo[0].shape;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fval;

          /* "pandas/src/inference.pyx":434
 *                 status = floatify(val, &fval)
 *                 floats[i] = fval
 *                 if not seen_float:             # <<<<<<<<<<<<<<
 *                     if '.' in val or fval == INF or fval == NEGINF:
 *                         seen_float = 1
 */
          __pyx_t_27 = (!__pyx_v_seen_float);
          if (__pyx_t_27) {

            /* "pandas/src/inference.pyx":435
 *                 floats[i] = fval
 *                 if not seen_float:
 *                     if '.' in val or fval == INF or fval == NEGINF:             # <<<<<<<<<<<<<<
 *                         seen_float = 1
 *                     elif 'inf' in val:  # special case to handle +/-inf
 */
            __pyx_t_27 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_59), __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            if (!__pyx_t_27) {
              __pyx_t_28 = (__pyx_v_fval == __pyx_v_6pandas_3lib_INF);
              if (!__pyx_t_28) {
                __pyx_t_14 = (__pyx_v_fval == __pyx_v_6pandas_3lib_NEGINF);
                __pyx_t_32 = __pyx_t_14;
              } else {
                __pyx_t_32 = __pyx_t_28;
              }
              __pyx_t_28 = __pyx_t_32;
            } else {
              __pyx_t_28 = __pyx_t_27;
            }
            if (__pyx_t_28) {

              /* "pandas/src/inference.pyx":436
 *                 if not seen_float:
 *                     if '.' in val or fval == INF or fval == NEGINF:
 *                         seen_float = 1             # <<<<<<<<<<<<<<
 *                     elif 'inf' in val:  # special case to handle +/-inf
 *                         seen_float = 1
 */
              __pyx_v_seen_float = 1;
              goto __pyx_L16;
            }

            /* "pandas/src/inference.pyx":437
 *                     if '.' in val or fval == INF or fval == NEGINF:
 *                         seen_float = 1
 *                     elif 'inf' in val:  # special case to handle +/-inf             # <<<<<<<<<<<<<<
 *                         seen_float = 1
 *                     elif fval < fINT64_MAX and fval > fINT64_MIN:
 */
            __pyx_t_28 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__inf), __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            if (__pyx_t_28) {

              /* "pandas/src/inference.pyx":438
 *                         seen_float = 1
 *                     elif 'inf' in val:  # special case to handle +/-inf
 *                         seen_float = 1             # <<<<<<<<<<<<<<
 *                     elif fval < fINT64_MAX and fval > fINT64_MIN:
 *                         try:
 */
              __pyx_v_seen_float = 1;
              goto __pyx_L16;
            }

            /* "pandas/src/inference.pyx":439
 *                     elif 'inf' in val:  # special case to handle +/-inf
 *                         seen_float = 1
 *                     elif fval < fINT64_MAX and fval > fINT64_MIN:             # <<<<<<<<<<<<<<
 *                         try:
 *                             ints[i] = int(val)
 */
            __pyx_t_28 = (__pyx_v_fval < __pyx_v_6pandas_3lib_fINT64_MAX);
            if (__pyx_t_28) {
              __pyx_t_27 = (__pyx_v_fval > __pyx_v_6pandas_3lib_fINT64_MIN);
              __pyx_t_32 = __pyx_t_27;
            } else {
              __pyx_t_32 = __pyx_t_28;
            }
            if (__pyx_t_32) {

              /* "pandas/src/inference.pyx":440
 *                         seen_float = 1
 *                     elif fval < fINT64_MAX and fval > fINT64_MIN:
 *                         try:             # <<<<<<<<<<<<<<
 *                             ints[i] = int(val)
 *                         except ValueError:
 */
              {
                __Pyx_ExceptionSave(&__pyx_t_33, &__pyx_t_34, &__pyx_t_35);
                __Pyx_XGOTREF(__pyx_t_33);
                __Pyx_XGOTREF(__pyx_t_34);
                __Pyx_XGOTREF(__pyx_t_35);
                /*try:*/ {

                  /* "pandas/src/inference.pyx":441
 *                     elif fval < fINT64_MAX and fval > fINT64_MIN:
 *                         try:
 *                             ints[i] = int(val)             # <<<<<<<<<<<<<<
 *                         except ValueError:
 *                             ints[i] = <int64_t> fval
 */
                  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_INCREF(__pyx_v_val);
                  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
                  __Pyx_GIVEREF(__pyx_v_val);
                  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
                  __pyx_t_22 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_22 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_36 = __pyx_v_i;
                  __pyx_t_7 = -1;
                  if (__pyx_t_36 < 0) {
                    __pyx_t_36 += __pyx_pybuffernd_ints.diminfo[0].shape;
                    if (unlikely(__pyx_t_36 < 0)) __pyx_t_7 = 0;
                  } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0;
                  if (unlikely(__pyx_t_7 != -1)) {
                    __Pyx_RaiseBufferIndexError(__pyx_t_7);
                    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
                  }
                  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_22;
                }
                __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                __Pyx_XDECREF(__pyx_t_34); __pyx_t_34 = 0;
                __Pyx_XDECREF(__pyx_t_35); __pyx_t_35 = 0;
                goto __pyx_L24_try_end;
                __pyx_L17_error:;
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "pandas/src/inference.pyx":442
 *                         try:
 *                             ints[i] = int(val)
 *                         except ValueError:             # <<<<<<<<<<<<<<
 *                             ints[i] = <int64_t> fval
 *                     else:
 */
                __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
                if (__pyx_t_7) {
                  __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_GOTREF(__pyx_t_4);

                  /* "pandas/src/inference.pyx":443
 *                             ints[i] = int(val)
 *                         except ValueError:
 *                             ints[i] = <int64_t> fval             # <<<<<<<<<<<<<<
 *                     else:
 *                         seen_float = 1
 */
                  __pyx_t_37 = __pyx_v_i;
                  __pyx_t_7 = -1;
                  if (__pyx_t_37 < 0) {
                    __pyx_t_37 += __pyx_pybuffernd_ints.diminfo[0].shape;
                    if (unlikely(__pyx_t_37 < 0)) __pyx_t_7 = 0;
                  } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0;
                  if (unlikely(__pyx_t_7 != -1)) {
                    __Pyx_RaiseBufferIndexError(__pyx_t_7);
                    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
                  }
                  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_ints.diminfo[0].strides) = ((__pyx_t_5numpy_int64_t)__pyx_v_fval);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  goto __pyx_L18_exception_handled;
                }
                __pyx_L19_except_error:;
                __Pyx_XGIVEREF(__pyx_t_33);
                __Pyx_XGIVEREF(__pyx_t_34);
                __Pyx_XGIVEREF(__pyx_t_35);
                __Pyx_ExceptionReset(__pyx_t_33, __pyx_t_34, __pyx_t_35);
                goto __pyx_L7_error;
                __pyx_L18_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_33);
                __Pyx_XGIVEREF(__pyx_t_34);
                __Pyx_XGIVEREF(__pyx_t_35);
                __Pyx_ExceptionReset(__pyx_t_33, __pyx_t_34, __pyx_t_35);
                __pyx_L24_try_end:;
              }
              goto __pyx_L16;
            }
            /*else*/ {

              /* "pandas/src/inference.pyx":445
 *                             ints[i] = <int64_t> fval
 *                     else:
 *                         seen_float = 1             # <<<<<<<<<<<<<<
 *             except:
 *                 if not coerce_numeric:
 */
              __pyx_v_seen_float = 1;
            }
            __pyx_L16:;
            goto __pyx_L15;
          }
          __pyx_L15:;
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L14_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pandas/src/inference.pyx":446
 *                     else:
 *                         seen_float = 1
 *             except:             # <<<<<<<<<<<<<<
 *                 if not coerce_numeric:
 *                     raise
 */
        /*except:*/ {
          __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);

          /* "pandas/src/inference.pyx":447
 *                         seen_float = 1
 *             except:
 *                 if not coerce_numeric:             # <<<<<<<<<<<<<<
 *                     raise
 * 
 */
          __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_numeric); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __pyx_t_28 = (!__pyx_t_32);
          if (__pyx_t_28) {

            /* "pandas/src/inference.pyx":448
 *             except:
 *                 if not coerce_numeric:
 *                     raise             # <<<<<<<<<<<<<<
 * 
 *                 floats[i] = nan
 */
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_ErrRestore(__pyx_t_4, __pyx_t_2, __pyx_t_3);
            __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
            goto __pyx_L29;
          }
          __pyx_L29:;

          /* "pandas/src/inference.pyx":450
 *                     raise
 * 
 *                 floats[i] = nan             # <<<<<<<<<<<<<<
 *                 seen_float = 1
 * 
 */
          __pyx_t_38 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_38 < 0) {
            __pyx_t_38 += __pyx_pybuffernd_floats.diminfo[0].shape;
            if (unlikely(__pyx_t_38 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan;

          /* "pandas/src/inference.pyx":451
 * 
 *                 floats[i] = nan
 *                 seen_float = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_v_seen_float = 1;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        __pyx_L14_try_end:;
      }
    }
    __pyx_L5:;
  }

  /* "pandas/src/inference.pyx":454
 * 
 * 
 *     if seen_complex:             # <<<<<<<<<<<<<<
 *         return complexes
 *     elif seen_float:
 */
  if (__pyx_v_seen_complex) {

    /* "pandas/src/inference.pyx":455
 * 
 *     if seen_complex:
 *         return complexes             # <<<<<<<<<<<<<<
 *     elif seen_float:
 *         return floats
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_complexes));
    __pyx_r = ((PyObject *)__pyx_v_complexes);
    goto __pyx_L0;
    goto __pyx_L30;
  }

  /* "pandas/src/inference.pyx":456
 *     if seen_complex:
 *         return complexes
 *     elif seen_float:             # <<<<<<<<<<<<<<
 *         return floats
 *     else:
 */
  if (__pyx_v_seen_float) {

    /* "pandas/src/inference.pyx":457
 *         return complexes
 *     elif 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_L30;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":459
 *         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_L30:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_floats);
  __Pyx_XDECREF((PyObject *)__pyx_v_complexes);
  __Pyx_XDECREF((PyObject *)__pyx_v_ints);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_143maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_142maybe_convert_objects[] = "\n    Type inference function-- convert object array to proper dtype\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_143maybe_convert_objects = {__Pyx_NAMESTR("maybe_convert_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_143maybe_convert_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_142maybe_convert_objects)};
static PyObject *__pyx_pw_6pandas_3lib_143maybe_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;
  int __pyx_v_convert_datetime;
  int __pyx_v_convert_timedelta;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_convert_objects (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__objects,&__pyx_n_s__try_float,&__pyx_n_s__safe,&__pyx_n_s__convert_datetime,&__pyx_n_s__convert_timedelta,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__objects)) != 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--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_datetime);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_timedelta);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_objects = ((PyArrayObject *)values[0]);
    if (values[1]) {
      __pyx_v_try_float = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_try_float == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __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 = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_safe = ((int)0);
    }
    if (values[3]) {
      __pyx_v_convert_datetime = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_convert_datetime == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_convert_datetime = ((int)0);
    }
    if (values[4]) {
      __pyx_v_convert_timedelta = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_convert_timedelta == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_convert_timedelta = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maybe_convert_objects", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), __pyx_ptype_5numpy_ndarray, 1, "objects", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_142maybe_convert_objects(__pyx_self, __pyx_v_objects, __pyx_v_try_float, __pyx_v_safe, __pyx_v_convert_datetime, __pyx_v_convert_timedelta);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":461
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0, bint convert_datetime=0, bint convert_timedelta=0):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_3lib_142maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe, int __pyx_v_convert_datetime, int __pyx_v_convert_timedelta) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_floats = 0;
  PyArrayObject *__pyx_v_complexes = 0;
  PyArrayObject *__pyx_v_ints = 0;
  PyArrayObject *__pyx_v_bools = 0;
  PyArrayObject *__pyx_v_idatetimes = 0;
  PyArrayObject *__pyx_v_itimedeltas = 0;
  int __pyx_v_seen_float;
  int __pyx_v_seen_complex;
  int __pyx_v_seen_datetime;
  int __pyx_v_seen_timedelta;
  int __pyx_v_seen_int;
  int __pyx_v_seen_bool;
  int __pyx_v_seen_object;
  int __pyx_v_seen_null;
  int __pyx_v_seen_numeric;
  PyObject *__pyx_v_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_onan = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fnan;
  PyObject *__pyx_v_datetimes = NULL;
  PyObject *__pyx_v_timedeltas = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_bools;
  __Pyx_Buffer __pyx_pybuffer_bools;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_complexes;
  __Pyx_Buffer __pyx_pybuffer_complexes;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_floats;
  __Pyx_Buffer __pyx_pybuffer_floats;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_idatetimes;
  __Pyx_Buffer __pyx_pybuffer_idatetimes;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ints;
  __Pyx_Buffer __pyx_pybuffer_ints;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_itimedeltas;
  __Pyx_Buffer __pyx_pybuffer_itimedeltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objects;
  __Pyx_Buffer __pyx_pybuffer_objects;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyArrayObject *__pyx_t_14 = NULL;
  PyArrayObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  __pyx_t_5numpy_uint8_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  __pyx_t_double_complex __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  __pyx_t_5numpy_int64_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;
  int __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  double __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  int __pyx_t_39;
  int __pyx_t_40;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_convert_objects", 0);
  __pyx_pybuffer_floats.pybuffer.buf = NULL;
  __pyx_pybuffer_floats.refcount = 0;
  __pyx_pybuffernd_floats.data = NULL;
  __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats;
  __pyx_pybuffer_complexes.pybuffer.buf = NULL;
  __pyx_pybuffer_complexes.refcount = 0;
  __pyx_pybuffernd_complexes.data = NULL;
  __pyx_pybuffernd_complexes.rcbuffer = &__pyx_pybuffer_complexes;
  __pyx_pybuffer_ints.pybuffer.buf = NULL;
  __pyx_pybuffer_ints.refcount = 0;
  __pyx_pybuffernd_ints.data = NULL;
  __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints;
  __pyx_pybuffer_bools.pybuffer.buf = NULL;
  __pyx_pybuffer_bools.refcount = 0;
  __pyx_pybuffernd_bools.data = NULL;
  __pyx_pybuffernd_bools.rcbuffer = &__pyx_pybuffer_bools;
  __pyx_pybuffer_idatetimes.pybuffer.buf = NULL;
  __pyx_pybuffer_idatetimes.refcount = 0;
  __pyx_pybuffernd_idatetimes.data = NULL;
  __pyx_pybuffernd_idatetimes.rcbuffer = &__pyx_pybuffer_idatetimes;
  __pyx_pybuffer_itimedeltas.pybuffer.buf = NULL;
  __pyx_pybuffer_itimedeltas.refcount = 0;
  __pyx_pybuffernd_itimedeltas.data = NULL;
  __pyx_pybuffernd_itimedeltas.rcbuffer = &__pyx_pybuffer_itimedeltas;
  __pyx_pybuffer_objects.pybuffer.buf = NULL;
  __pyx_pybuffer_objects.refcount = 0;
  __pyx_pybuffernd_objects.data = NULL;
  __pyx_pybuffernd_objects.rcbuffer = &__pyx_pybuffer_objects;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objects.rcbuffer->pybuffer, (PyObject*)__pyx_v_objects, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_objects.diminfo[0].strides = __pyx_pybuffernd_objects.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objects.diminfo[0].shape = __pyx_pybuffernd_objects.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":474
 *         ndarray[int64_t] idatetimes
 *         ndarray[int64_t] itimedeltas
 *         bint seen_float = 0             # <<<<<<<<<<<<<<
 *         bint seen_complex = 0
 *         bint seen_datetime = 0
 */
  __pyx_v_seen_float = 0;

  /* "pandas/src/inference.pyx":475
 *         ndarray[int64_t] itimedeltas
 *         bint seen_float = 0
 *         bint seen_complex = 0             # <<<<<<<<<<<<<<
 *         bint seen_datetime = 0
 *         bint seen_timedelta = 0
 */
  __pyx_v_seen_complex = 0;

  /* "pandas/src/inference.pyx":476
 *         bint seen_float = 0
 *         bint seen_complex = 0
 *         bint seen_datetime = 0             # <<<<<<<<<<<<<<
 *         bint seen_timedelta = 0
 *         bint seen_int = 0
 */
  __pyx_v_seen_datetime = 0;

  /* "pandas/src/inference.pyx":477
 *         bint seen_complex = 0
 *         bint seen_datetime = 0
 *         bint seen_timedelta = 0             # <<<<<<<<<<<<<<
 *         bint seen_int = 0
 *         bint seen_bool = 0
 */
  __pyx_v_seen_timedelta = 0;

  /* "pandas/src/inference.pyx":478
 *         bint seen_datetime = 0
 *         bint seen_timedelta = 0
 *         bint seen_int = 0             # <<<<<<<<<<<<<<
 *         bint seen_bool = 0
 *         bint seen_object = 0
 */
  __pyx_v_seen_int = 0;

  /* "pandas/src/inference.pyx":479
 *         bint seen_timedelta = 0
 *         bint seen_int = 0
 *         bint seen_bool = 0             # <<<<<<<<<<<<<<
 *         bint seen_object = 0
 *         bint seen_null = 0
 */
  __pyx_v_seen_bool = 0;

  /* "pandas/src/inference.pyx":480
 *         bint seen_int = 0
 *         bint seen_bool = 0
 *         bint seen_object = 0             # <<<<<<<<<<<<<<
 *         bint seen_null = 0
 *         bint seen_numeric = 0
 */
  __pyx_v_seen_object = 0;

  /* "pandas/src/inference.pyx":481
 *         bint seen_bool = 0
 *         bint seen_object = 0
 *         bint seen_null = 0             # <<<<<<<<<<<<<<
 *         bint seen_numeric = 0
 *         object val, onan
 */
  __pyx_v_seen_null = 0;

  /* "pandas/src/inference.pyx":482
 *         bint seen_object = 0
 *         bint seen_null = 0
 *         bint seen_numeric = 0             # <<<<<<<<<<<<<<
 *         object val, onan
 *         float64_t fval, fnan
 */
  __pyx_v_seen_numeric = 0;

  /* "pandas/src/inference.pyx":486
 *         float64_t fval, fnan
 * 
 *     n = len(objects)             # <<<<<<<<<<<<<<
 * 
 *     floats = np.empty(n, dtype='f8')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_objects)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":488
 *     n = len(objects)
 * 
 *     floats = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 *     complexes = np.empty(n, dtype='c16')
 *     ints = np.empty(n, dtype='i8')
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __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 = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_floats = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":489
 * 
 *     floats = np.empty(n, dtype='f8')
 *     complexes = np.empty(n, dtype='c16')             # <<<<<<<<<<<<<<
 *     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 = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __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 = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __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__c16)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo___pyx_t_double_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_v_complexes, &__Pyx_TypeInfo___pyx_t_double_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_complexes.diminfo[0].strides = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_complexes.diminfo[0].shape = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_complexes = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":490
 *     floats = np.empty(n, dtype='f8')
 *     complexes = np.empty(n, dtype='c16')
 *     ints = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 *     bools = np.empty(n, dtype=np.uint8)
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __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 = 490; __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 = 490; __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 = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __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__i8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __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;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_ints = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":491
 *     complexes = np.empty(n, dtype='c16')
 *     ints = np.empty(n, dtype='i8')
 *     bools = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     if convert_datetime:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __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 = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __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_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_13);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bools.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__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_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bools.rcbuffer->pybuffer, (PyObject*)__pyx_v_bools, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_bools.diminfo[0].strides = __pyx_pybuffernd_bools.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bools.diminfo[0].shape = __pyx_pybuffernd_bools.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_14 = 0;
  __pyx_v_bools = ((PyArrayObject *)__pyx_t_13);
  __pyx_t_13 = 0;

  /* "pandas/src/inference.pyx":493
 *     bools = np.empty(n, dtype=np.uint8)
 * 
 *     if convert_datetime:             # <<<<<<<<<<<<<<
 *         datetimes = np.empty(n, dtype='M8[ns]')
 *         idatetimes = datetimes.view(np.int64)
 */
  if (__pyx_v_convert_datetime) {

    /* "pandas/src/inference.pyx":494
 * 
 *     if convert_datetime:
 *         datetimes = np.empty(n, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *         idatetimes = datetimes.view(np.int64)
 * 
 */
    __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_13);
    __pyx_t_13 = 0;
    __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_13));
    if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_10)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
    __pyx_v_datetimes = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":495
 *     if convert_datetime:
 *         datetimes = np.empty(n, dtype='M8[ns]')
 *         idatetimes = datetimes.view(np.int64)             # <<<<<<<<<<<<<<
 * 
 *     if convert_timedelta:
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_datetimes, __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_15 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer, (PyObject*)__pyx_v_idatetimes, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        }
      }
      __pyx_pybuffernd_idatetimes.diminfo[0].strides = __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idatetimes.diminfo[0].shape = __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_15 = 0;
    __pyx_v_idatetimes = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":497
 *         idatetimes = datetimes.view(np.int64)
 * 
 *     if convert_timedelta:             # <<<<<<<<<<<<<<
 *         timedeltas = np.empty(n, dtype='m8[ns]')
 *         itimedeltas = timedeltas.view(np.int64)
 */
  if (__pyx_v_convert_timedelta) {

    /* "pandas/src/inference.pyx":498
 * 
 *     if convert_timedelta:
 *         timedeltas = np.empty(n, dtype='m8[ns]')             # <<<<<<<<<<<<<<
 *         itimedeltas = timedeltas.view(np.int64)
 * 
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __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[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __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_kp_s_11)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_timedeltas = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":499
 *     if convert_timedelta:
 *         timedeltas = np.empty(n, dtype='m8[ns]')
 *         itimedeltas = timedeltas.view(np.int64)             # <<<<<<<<<<<<<<
 * 
 *     onan = np.nan
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_timedeltas, __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_16 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_itimedeltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        }
      }
      __pyx_pybuffernd_itimedeltas.diminfo[0].strides = __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_itimedeltas.diminfo[0].shape = __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_16 = 0;
    __pyx_v_itimedeltas = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/inference.pyx":501
 *         itimedeltas = timedeltas.view(np.int64)
 * 
 *     onan = np.nan             # <<<<<<<<<<<<<<
 *     fnan = 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 = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_onan = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/src/inference.pyx":502
 * 
 *     onan = np.nan
 *     fnan = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fnan = __pyx_t_17;

  /* "pandas/src/inference.pyx":504
 *     fnan = np.nan
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = objects[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":505
 * 
 *     for i from 0 <= i < n:
 *         val = objects[i]             # <<<<<<<<<<<<<<
 * 
 *         if val is None:
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_pybuffernd_objects.diminfo[0].shape;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_objects.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objects.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_objects.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":507
 *         val = objects[i]
 * 
 *         if val is None:             # <<<<<<<<<<<<<<
 *             seen_null = 1
 *             floats[i] = complexes[i] = fnan
 */
    __pyx_t_19 = (__pyx_v_val == Py_None);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":508
 * 
 *         if val is None:
 *             seen_null = 1             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = fnan
 *         elif util.is_bool_object(val):
 */
      __pyx_v_seen_null = 1;

      /* "pandas/src/inference.pyx":509
 *         if val is None:
 *             seen_null = 1
 *             floats[i] = complexes[i] = fnan             # <<<<<<<<<<<<<<
 *         elif util.is_bool_object(val):
 *             seen_bool = 1
 */
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fnan;
      __pyx_t_21 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_fnan, 0);
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":510
 *             seen_null = 1
 *             floats[i] = complexes[i] = fnan
 *         elif util.is_bool_object(val):             # <<<<<<<<<<<<<<
 *             seen_bool = 1
 *             bools[i] = val
 */
    __pyx_t_7 = is_bool_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":511
 *             floats[i] = complexes[i] = fnan
 *         elif util.is_bool_object(val):
 *             seen_bool = 1             # <<<<<<<<<<<<<<
 *             bools[i] = val
 *         elif util.is_float_object(val):
 */
      __pyx_v_seen_bool = 1;

      /* "pandas/src/inference.pyx":512
 *         elif util.is_bool_object(val):
 *             seen_bool = 1
 *             bools[i] = val             # <<<<<<<<<<<<<<
 *         elif util.is_float_object(val):
 *             floats[i] = complexes[i] = val
 */
      __pyx_t_22 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_val); if (unlikely((__pyx_t_22 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_bools.diminfo[0].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_bools.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_bools.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_bools.diminfo[0].strides) = __pyx_t_22;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":513
 *             seen_bool = 1
 *             bools[i] = val
 *         elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 */
    __pyx_t_7 = is_float_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":514
 *             bools[i] = val
 *         elif util.is_float_object(val):
 *             floats[i] = complexes[i] = val             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif util.is_datetime64_object(val):
 */
      __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_24 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_24 < 0) {
        __pyx_t_24 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_17;
      __pyx_t_25 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_26 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_26 < 0) {
        __pyx_t_26 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_25;

      /* "pandas/src/inference.pyx":515
 *         elif util.is_float_object(val):
 *             floats[i] = complexes[i] = val
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif util.is_datetime64_object(val):
 *             if convert_datetime:
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":516
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 *         elif util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *             if convert_datetime:
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 */
    __pyx_t_7 = is_datetime64_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":517
 *             seen_float = 1
 *         elif util.is_datetime64_object(val):
 *             if convert_datetime:             # <<<<<<<<<<<<<<
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 *                 seen_datetime = 1
 */
      if (__pyx_v_convert_datetime) {

        /* "pandas/src/inference.pyx":518
 *         elif util.is_datetime64_object(val):
 *             if convert_datetime:
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value             # <<<<<<<<<<<<<<
 *                 seen_datetime = 1
 *             else:
 */
        __pyx_t_3 = Py_None;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = Py_None;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_27 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_27 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_28 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_28 < 0) {
          __pyx_t_28 += __pyx_pybuffernd_idatetimes.diminfo[0].shape;
          if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_idatetimes.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_27;

        /* "pandas/src/inference.pyx":519
 *             if convert_datetime:
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 *                 seen_datetime = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen_object = 1
 */
        __pyx_v_seen_datetime = 1;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":521
 *                 seen_datetime = 1
 *             else:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *                 # objects[i] = val.astype('O')
 *                 break
 */
        __pyx_v_seen_object = 1;

        /* "pandas/src/inference.pyx":523
 *                 seen_object = 1
 *                 # objects[i] = val.astype('O')
 *                 break             # <<<<<<<<<<<<<<
 *         elif is_timedelta(val):
 *             if convert_timedelta:
 */
        goto __pyx_L6_break;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":524
 *                 # objects[i] = val.astype('O')
 *                 break
 *         elif is_timedelta(val):             # <<<<<<<<<<<<<<
 *             if convert_timedelta:
 *                 itimedeltas[i] = convert_to_timedelta64(val, 'ns', False)
 */
    __pyx_t_19 = __pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":525
 *                 break
 *         elif is_timedelta(val):
 *             if convert_timedelta:             # <<<<<<<<<<<<<<
 *                 itimedeltas[i] = convert_to_timedelta64(val, 'ns', False)
 *                 seen_timedelta = 1
 */
      if (__pyx_v_convert_timedelta) {

        /* "pandas/src/inference.pyx":526
 *         elif is_timedelta(val):
 *             if convert_timedelta:
 *                 itimedeltas[i] = convert_to_timedelta64(val, 'ns', False)             # <<<<<<<<<<<<<<
 *                 seen_timedelta = 1
 *             else:
 */
        __pyx_t_4 = ((PyObject *)__pyx_n_s__ns);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_v_val, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __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_27 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_27 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_29 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_29 < 0) {
          __pyx_t_29 += __pyx_pybuffernd_itimedeltas.diminfo[0].shape;
          if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_itimedeltas.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_itimedeltas.diminfo[0].strides) = __pyx_t_27;

        /* "pandas/src/inference.pyx":527
 *             if convert_timedelta:
 *                 itimedeltas[i] = convert_to_timedelta64(val, 'ns', False)
 *                 seen_timedelta = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen_object = 1
 */
        __pyx_v_seen_timedelta = 1;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":529
 *                 seen_timedelta = 1
 *             else:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif util.is_integer_object(val):
 */
        __pyx_v_seen_object = 1;

        /* "pandas/src/inference.pyx":530
 *             else:
 *                 seen_object = 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif util.is_integer_object(val):
 *             seen_int = 1
 */
        goto __pyx_L6_break;
      }
      __pyx_L9:;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":531
 *                 seen_object = 1
 *                 break
 *         elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             seen_int = 1
 *             floats[i] = <float64_t> val
 */
    __pyx_t_7 = is_integer_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":532
 *                 break
 *         elif util.is_integer_object(val):
 *             seen_int = 1             # <<<<<<<<<<<<<<
 *             floats[i] = <float64_t> val
 *             complexes[i] = <double complex> val
 */
      __pyx_v_seen_int = 1;

      /* "pandas/src/inference.pyx":533
 *         elif util.is_integer_object(val):
 *             seen_int = 1
 *             floats[i] = <float64_t> val             # <<<<<<<<<<<<<<
 *             complexes[i] = <double complex> val
 *             if not seen_null:
 */
      __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_30 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_30 < 0) {
        __pyx_t_30 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_floats.diminfo[0].strides) = ((__pyx_t_5numpy_float64_t)__pyx_t_17);

      /* "pandas/src/inference.pyx":534
 *             seen_int = 1
 *             floats[i] = <float64_t> val
 *             complexes[i] = <double complex> val             # <<<<<<<<<<<<<<
 *             if not seen_null:
 *                 try:
 */
      __pyx_t_25 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_31 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_31 < 0) {
        __pyx_t_31 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(((double)__Pyx_CREAL(__pyx_t_25)), ((double)__Pyx_CIMAG(__pyx_t_25)));

      /* "pandas/src/inference.pyx":535
 *             floats[i] = <float64_t> val
 *             complexes[i] = <double complex> val
 *             if not seen_null:             # <<<<<<<<<<<<<<
 *                 try:
 *                     ints[i] = val
 */
      __pyx_t_19 = (!__pyx_v_seen_null);
      if (__pyx_t_19) {

        /* "pandas/src/inference.pyx":536
 *             complexes[i] = <double complex> val
 *             if not seen_null:
 *                 try:             # <<<<<<<<<<<<<<
 *                     ints[i] = val
 *                 except OverflowError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          /*try:*/ {

            /* "pandas/src/inference.pyx":537
 *             if not seen_null:
 *                 try:
 *                     ints[i] = val             # <<<<<<<<<<<<<<
 *                 except OverflowError:
 *                     seen_object = 1
 */
            __pyx_t_27 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_27 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
            __pyx_t_32 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_32 < 0) {
              __pyx_t_32 += __pyx_pybuffernd_ints.diminfo[0].shape;
              if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_27;
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L18_try_end;
          __pyx_L11_error:;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pandas/src/inference.pyx":538
 *                 try:
 *                     ints[i] = val
 *                 except OverflowError:             # <<<<<<<<<<<<<<
 *                     seen_object = 1
 *                     break
 */
          __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
          if (__pyx_t_7) {
            __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_t_4);

            /* "pandas/src/inference.pyx":539
 *                     ints[i] = val
 *                 except OverflowError:
 *                     seen_object = 1             # <<<<<<<<<<<<<<
 *                     break
 *         elif util.is_complex_object(val):
 */
            __pyx_v_seen_object = 1;

            /* "pandas/src/inference.pyx":540
 *                 except OverflowError:
 *                     seen_object = 1
 *                     break             # <<<<<<<<<<<<<<
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 */
            goto __pyx_L19_except_break;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L12_exception_handled;
            __pyx_L19_except_break:;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L16_try_break;
          }
          __pyx_L13_except_error:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          goto __pyx_L1_error;
          __pyx_L16_try_break:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          goto __pyx_L6_break;
          __pyx_L12_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          __pyx_L18_try_end:;
        }
        goto __pyx_L10;
      }
      __pyx_L10:;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":541
 *                     seen_object = 1
 *                     break
 *         elif util.is_complex_object(val):             # <<<<<<<<<<<<<<
 *             complexes[i] = val
 *             seen_complex = 1
 */
    __pyx_t_7 = is_complex_object(__pyx_v_val);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":542
 *                     break
 *         elif util.is_complex_object(val):
 *             complexes[i] = val             # <<<<<<<<<<<<<<
 *             seen_complex = 1
 *         elif PyDateTime_Check(val) or util.is_datetime64_object(val):
 */
      __pyx_t_25 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_33 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_33 < 0) {
        __pyx_t_33 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_25;

      /* "pandas/src/inference.pyx":543
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 *             seen_complex = 1             # <<<<<<<<<<<<<<
 *         elif PyDateTime_Check(val) or util.is_datetime64_object(val):
 *             if convert_datetime:
 */
      __pyx_v_seen_complex = 1;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":544
 *             complexes[i] = val
 *             seen_complex = 1
 *         elif PyDateTime_Check(val) or util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *             if convert_datetime:
 *                 seen_datetime = 1
 */
    __pyx_t_19 = PyDateTime_Check(__pyx_v_val);
    if (!__pyx_t_19) {
      __pyx_t_34 = is_datetime64_object(__pyx_v_val);
    } else {
      __pyx_t_34 = __pyx_t_19;
    }
    if (__pyx_t_34) {

      /* "pandas/src/inference.pyx":545
 *             seen_complex = 1
 *         elif PyDateTime_Check(val) or util.is_datetime64_object(val):
 *             if convert_datetime:             # <<<<<<<<<<<<<<
 *                 seen_datetime = 1
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 */
      if (__pyx_v_convert_datetime) {

        /* "pandas/src/inference.pyx":546
 *         elif PyDateTime_Check(val) or util.is_datetime64_object(val):
 *             if convert_datetime:
 *                 seen_datetime = 1             # <<<<<<<<<<<<<<
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 *             else:
 */
        __pyx_v_seen_datetime = 1;

        /* "pandas/src/inference.pyx":547
 *             if convert_datetime:
 *                 seen_datetime = 1
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value             # <<<<<<<<<<<<<<
 *             else:
 *                 seen_object = 1
 */
        __pyx_t_4 = Py_None;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __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_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_27 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_27 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_35 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_35 < 0) {
          __pyx_t_35 += __pyx_pybuffernd_idatetimes.diminfo[0].shape;
          if (unlikely(__pyx_t_35 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_idatetimes.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_27;
        goto __pyx_L21;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":549
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 *             else:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif try_float and not util.is_string_object(val):
 */
        __pyx_v_seen_object = 1;

        /* "pandas/src/inference.pyx":550
 *             else:
 *                 seen_object = 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif try_float and not util.is_string_object(val):
 *             # this will convert Decimal objects
 */
        goto __pyx_L6_break;
      }
      __pyx_L21:;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":551
 *                 seen_object = 1
 *                 break
 *         elif try_float and not util.is_string_object(val):             # <<<<<<<<<<<<<<
 *             # this will convert Decimal objects
 *             try:
 */
    if (__pyx_v_try_float) {
      __pyx_t_34 = (!is_string_object(__pyx_v_val));
      __pyx_t_19 = __pyx_t_34;
    } else {
      __pyx_t_19 = __pyx_v_try_float;
    }
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":553
 *         elif try_float and not util.is_string_object(val):
 *             # this will convert Decimal objects
 *             try:             # <<<<<<<<<<<<<<
 *                 floats[i] = float(val)
 *                 complexes[i] = complex(val)
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "pandas/src/inference.pyx":554
 *             # this will convert Decimal objects
 *             try:
 *                 floats[i] = float(val)             # <<<<<<<<<<<<<<
 *                 complexes[i] = complex(val)
 *                 seen_float = 1
 */
          __pyx_t_36 = __Pyx_PyObject_AsDouble(__pyx_v_val); if (unlikely(__pyx_t_36 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
          __pyx_t_37 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_37 < 0) {
            __pyx_t_37 += __pyx_pybuffernd_floats.diminfo[0].shape;
            if (unlikely(__pyx_t_37 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_36;

          /* "pandas/src/inference.pyx":555
 *             try:
 *                 floats[i] = float(val)
 *                 complexes[i] = complex(val)             # <<<<<<<<<<<<<<
 *                 seen_float = 1
 *             except Exception:
 */
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_val);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
          __Pyx_GIVEREF(__pyx_v_val);
          __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyComplex_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_t_25 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_38 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_38 < 0) {
            __pyx_t_38 += __pyx_pybuffernd_complexes.diminfo[0].shape;
            if (unlikely(__pyx_t_38 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_25;

          /* "pandas/src/inference.pyx":556
 *                 floats[i] = float(val)
 *                 complexes[i] = complex(val)
 *                 seen_float = 1             # <<<<<<<<<<<<<<
 *             except Exception:
 *                 seen_object = 1
 */
          __pyx_v_seen_float = 1;
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L29_try_end;
        __pyx_L22_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pandas/src/inference.pyx":557
 *                 complexes[i] = complex(val)
 *                 seen_float = 1
 *             except Exception:             # <<<<<<<<<<<<<<
 *                 seen_object = 1
 *                 break
 */
        __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_4);

          /* "pandas/src/inference.pyx":558
 *                 seen_float = 1
 *             except Exception:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
          __pyx_v_seen_object = 1;

          /* "pandas/src/inference.pyx":559
 *             except Exception:
 *                 seen_object = 1
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             seen_object = 1
 */
          goto __pyx_L30_except_break;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L23_exception_handled;
          __pyx_L30_except_break:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L27_try_break;
        }
        __pyx_L24_except_error:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L27_try_break:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        goto __pyx_L6_break;
        __pyx_L23_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        __pyx_L29_try_end:;
      }
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":561
 *                 break
 *         else:
 *             seen_object = 1             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_seen_object = 1;

      /* "pandas/src/inference.pyx":562
 *         else:
 *             seen_object = 1
 *             break             # <<<<<<<<<<<<<<
 * 
 *     seen_numeric = seen_complex or seen_float or seen_int
 */
      goto __pyx_L6_break;
    }
    __pyx_L7:;
  }
  __pyx_L6_break:;

  /* "pandas/src/inference.pyx":564
 *             break
 * 
 *     seen_numeric = seen_complex or seen_float or seen_int             # <<<<<<<<<<<<<<
 * 
 *     if not seen_object:
 */
  if (!__pyx_v_seen_complex) {
    if (!__pyx_v_seen_float) {
      __pyx_t_19 = __pyx_v_seen_int;
    } else {
      __pyx_t_19 = __pyx_v_seen_float;
    }
    __pyx_t_34 = __pyx_t_19;
  } else {
    __pyx_t_34 = __pyx_v_seen_complex;
  }
  __pyx_v_seen_numeric = __pyx_t_34;

  /* "pandas/src/inference.pyx":566
 *     seen_numeric = seen_complex or seen_float or seen_int
 * 
 *     if not seen_object:             # <<<<<<<<<<<<<<
 * 
 *         if not safe:
 */
  __pyx_t_34 = (!__pyx_v_seen_object);
  if (__pyx_t_34) {

    /* "pandas/src/inference.pyx":568
 *     if not seen_object:
 * 
 *         if not safe:             # <<<<<<<<<<<<<<
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 */
    __pyx_t_34 = (!__pyx_v_safe);
    if (__pyx_t_34) {

      /* "pandas/src/inference.pyx":569
 * 
 *         if not safe:
 *             if seen_null:             # <<<<<<<<<<<<<<
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 *                     if seen_complex:
 */
      if (__pyx_v_seen_null) {

        /* "pandas/src/inference.pyx":570
 *         if not safe:
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:             # <<<<<<<<<<<<<<
 *                     if seen_complex:
 *                         return complexes
 */
        __pyx_t_34 = (!__pyx_v_seen_bool);
        if (__pyx_t_34) {
          __pyx_t_19 = (!__pyx_v_seen_datetime);
          if (__pyx_t_19) {
            __pyx_t_39 = (!__pyx_v_seen_timedelta);
            __pyx_t_40 = __pyx_t_39;
          } else {
            __pyx_t_40 = __pyx_t_19;
          }
          __pyx_t_19 = __pyx_t_40;
        } else {
          __pyx_t_19 = __pyx_t_34;
        }
        if (__pyx_t_19) {

          /* "pandas/src/inference.pyx":571
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 *                     if seen_complex:             # <<<<<<<<<<<<<<
 *                         return complexes
 *                     elif seen_float or seen_int:
 */
          if (__pyx_v_seen_complex) {

            /* "pandas/src/inference.pyx":572
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 *                     if seen_complex:
 *                         return complexes             # <<<<<<<<<<<<<<
 *                     elif seen_float or seen_int:
 *                         return floats
 */
            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(((PyObject *)__pyx_v_complexes));
            __pyx_r = ((PyObject *)__pyx_v_complexes);
            goto __pyx_L0;
            goto __pyx_L36;
          }

          /* "pandas/src/inference.pyx":573
 *                     if seen_complex:
 *                         return complexes
 *                     elif seen_float or seen_int:             # <<<<<<<<<<<<<<
 *                         return floats
 *             else:
 */
          if (!__pyx_v_seen_float) {
            __pyx_t_19 = __pyx_v_seen_int;
          } else {
            __pyx_t_19 = __pyx_v_seen_float;
          }
          if (__pyx_t_19) {

            /* "pandas/src/inference.pyx":574
 *                         return complexes
 *                     elif seen_float or seen_int:
 *                         return floats             # <<<<<<<<<<<<<<
 *             else:
 *                 if not seen_bool:
 */
            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(((PyObject *)__pyx_v_floats));
            __pyx_r = ((PyObject *)__pyx_v_floats);
            goto __pyx_L0;
            goto __pyx_L36;
          }
          __pyx_L36:;
          goto __pyx_L35;
        }
        __pyx_L35:;
        goto __pyx_L34;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":576
 *                         return floats
 *             else:
 *                 if not seen_bool:             # <<<<<<<<<<<<<<
 *                     if seen_datetime:
 *                         if not seen_numeric:
 */
        __pyx_t_19 = (!__pyx_v_seen_bool);
        if (__pyx_t_19) {

          /* "pandas/src/inference.pyx":577
 *             else:
 *                 if not seen_bool:
 *                     if seen_datetime:             # <<<<<<<<<<<<<<
 *                         if not seen_numeric:
 *                             return datetimes
 */
          if (__pyx_v_seen_datetime) {

            /* "pandas/src/inference.pyx":578
 *                 if not seen_bool:
 *                     if seen_datetime:
 *                         if not seen_numeric:             # <<<<<<<<<<<<<<
 *                             return datetimes
 *                     elif seen_timedelta:
 */
            __pyx_t_19 = (!__pyx_v_seen_numeric);
            if (__pyx_t_19) {

              /* "pandas/src/inference.pyx":579
 *                     if seen_datetime:
 *                         if not seen_numeric:
 *                             return datetimes             # <<<<<<<<<<<<<<
 *                     elif seen_timedelta:
 *                         if not seen_numeric:
 */
              __Pyx_XDECREF(__pyx_r);
              if (unlikely(!__pyx_v_datetimes)) { __Pyx_RaiseUnboundLocalError("datetimes"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
              __Pyx_INCREF(__pyx_v_datetimes);
              __pyx_r = __pyx_v_datetimes;
              goto __pyx_L0;
              goto __pyx_L39;
            }
            __pyx_L39:;
            goto __pyx_L38;
          }

          /* "pandas/src/inference.pyx":580
 *                         if not seen_numeric:
 *                             return datetimes
 *                     elif seen_timedelta:             # <<<<<<<<<<<<<<
 *                         if not seen_numeric:
 *                             return timedeltas
 */
          if (__pyx_v_seen_timedelta) {

            /* "pandas/src/inference.pyx":581
 *                             return datetimes
 *                     elif seen_timedelta:
 *                         if not seen_numeric:             # <<<<<<<<<<<<<<
 *                             return timedeltas
 *                     else:
 */
            __pyx_t_19 = (!__pyx_v_seen_numeric);
            if (__pyx_t_19) {

              /* "pandas/src/inference.pyx":582
 *                     elif seen_timedelta:
 *                         if not seen_numeric:
 *                             return timedeltas             # <<<<<<<<<<<<<<
 *                     else:
 *                         if seen_complex:
 */
              __Pyx_XDECREF(__pyx_r);
              if (unlikely(!__pyx_v_timedeltas)) { __Pyx_RaiseUnboundLocalError("timedeltas"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
              __Pyx_INCREF(__pyx_v_timedeltas);
              __pyx_r = __pyx_v_timedeltas;
              goto __pyx_L0;
              goto __pyx_L40;
            }
            __pyx_L40:;
            goto __pyx_L38;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":584
 *                             return timedeltas
 *                     else:
 *                         if seen_complex:             # <<<<<<<<<<<<<<
 *                             return complexes
 *                         elif seen_float:
 */
            if (__pyx_v_seen_complex) {

              /* "pandas/src/inference.pyx":585
 *                     else:
 *                         if seen_complex:
 *                             return complexes             # <<<<<<<<<<<<<<
 *                         elif seen_float:
 *                             return floats
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(((PyObject *)__pyx_v_complexes));
              __pyx_r = ((PyObject *)__pyx_v_complexes);
              goto __pyx_L0;
              goto __pyx_L41;
            }

            /* "pandas/src/inference.pyx":586
 *                         if seen_complex:
 *                             return complexes
 *                         elif seen_float:             # <<<<<<<<<<<<<<
 *                             return floats
 *                         elif seen_int:
 */
            if (__pyx_v_seen_float) {

              /* "pandas/src/inference.pyx":587
 *                             return complexes
 *                         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_L41;
            }

            /* "pandas/src/inference.pyx":588
 *                         elif seen_float:
 *                             return floats
 *                         elif seen_int:             # <<<<<<<<<<<<<<
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:
 */
            if (__pyx_v_seen_int) {

              /* "pandas/src/inference.pyx":589
 *                             return floats
 *                         elif seen_int:
 *                             return ints             # <<<<<<<<<<<<<<
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:
 *                     return bools.view(np.bool_)
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(((PyObject *)__pyx_v_ints));
              __pyx_r = ((PyObject *)__pyx_v_ints);
              goto __pyx_L0;
              goto __pyx_L41;
            }
            __pyx_L41:;
          }
          __pyx_L38:;
          goto __pyx_L37;
        }

        /* "pandas/src/inference.pyx":590
 *                         elif seen_int:
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:             # <<<<<<<<<<<<<<
 *                     return bools.view(np.bool_)
 * 
 */
        __pyx_t_19 = (!__pyx_v_seen_datetime);
        if (__pyx_t_19) {
          __pyx_t_34 = (!__pyx_v_seen_numeric);
          if (__pyx_t_34) {
            __pyx_t_40 = (!__pyx_v_seen_timedelta);
            __pyx_t_39 = __pyx_t_40;
          } else {
            __pyx_t_39 = __pyx_t_34;
          }
          __pyx_t_34 = __pyx_t_39;
        } else {
          __pyx_t_34 = __pyx_t_19;
        }
        if (__pyx_t_34) {

          /* "pandas/src/inference.pyx":591
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:
 *                     return bools.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
          __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __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[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;
          goto __pyx_L37;
        }
        __pyx_L37:;
      }
      __pyx_L34:;
      goto __pyx_L33;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":595
 *         else:
 *             # don't cast int to float, etc.
 *             if seen_null:             # <<<<<<<<<<<<<<
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 *                     if seen_complex:
 */
      if (__pyx_v_seen_null) {

        /* "pandas/src/inference.pyx":596
 *             # don't cast int to float, etc.
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:             # <<<<<<<<<<<<<<
 *                     if seen_complex:
 *                         if not seen_int:
 */
        __pyx_t_34 = (!__pyx_v_seen_bool);
        if (__pyx_t_34) {
          __pyx_t_19 = (!__pyx_v_seen_datetime);
          if (__pyx_t_19) {
            __pyx_t_39 = (!__pyx_v_seen_timedelta);
            __pyx_t_40 = __pyx_t_39;
          } else {
            __pyx_t_40 = __pyx_t_19;
          }
          __pyx_t_19 = __pyx_t_40;
        } else {
          __pyx_t_19 = __pyx_t_34;
        }
        if (__pyx_t_19) {

          /* "pandas/src/inference.pyx":597
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 *                     if seen_complex:             # <<<<<<<<<<<<<<
 *                         if not seen_int:
 *                             return complexes
 */
          if (__pyx_v_seen_complex) {

            /* "pandas/src/inference.pyx":598
 *                 if not seen_bool and not seen_datetime and not seen_timedelta:
 *                     if seen_complex:
 *                         if not seen_int:             # <<<<<<<<<<<<<<
 *                             return complexes
 *                     elif seen_float:
 */
            __pyx_t_19 = (!__pyx_v_seen_int);
            if (__pyx_t_19) {

              /* "pandas/src/inference.pyx":599
 *                     if seen_complex:
 *                         if not seen_int:
 *                             return complexes             # <<<<<<<<<<<<<<
 *                     elif seen_float:
 *                         if not seen_int:
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(((PyObject *)__pyx_v_complexes));
              __pyx_r = ((PyObject *)__pyx_v_complexes);
              goto __pyx_L0;
              goto __pyx_L45;
            }
            __pyx_L45:;
            goto __pyx_L44;
          }

          /* "pandas/src/inference.pyx":600
 *                         if not seen_int:
 *                             return complexes
 *                     elif seen_float:             # <<<<<<<<<<<<<<
 *                         if not seen_int:
 *                             return floats
 */
          if (__pyx_v_seen_float) {

            /* "pandas/src/inference.pyx":601
 *                             return complexes
 *                     elif seen_float:
 *                         if not seen_int:             # <<<<<<<<<<<<<<
 *                             return floats
 *             else:
 */
            __pyx_t_19 = (!__pyx_v_seen_int);
            if (__pyx_t_19) {

              /* "pandas/src/inference.pyx":602
 *                     elif seen_float:
 *                         if not seen_int:
 *                             return floats             # <<<<<<<<<<<<<<
 *             else:
 *                 if not seen_bool:
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(((PyObject *)__pyx_v_floats));
              __pyx_r = ((PyObject *)__pyx_v_floats);
              goto __pyx_L0;
              goto __pyx_L46;
            }
            __pyx_L46:;
            goto __pyx_L44;
          }
          __pyx_L44:;
          goto __pyx_L43;
        }
        __pyx_L43:;
        goto __pyx_L42;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":604
 *                             return floats
 *             else:
 *                 if not seen_bool:             # <<<<<<<<<<<<<<
 *                     if seen_datetime:
 *                         if not seen_numeric:
 */
        __pyx_t_19 = (!__pyx_v_seen_bool);
        if (__pyx_t_19) {

          /* "pandas/src/inference.pyx":605
 *             else:
 *                 if not seen_bool:
 *                     if seen_datetime:             # <<<<<<<<<<<<<<
 *                         if not seen_numeric:
 *                             return datetimes
 */
          if (__pyx_v_seen_datetime) {

            /* "pandas/src/inference.pyx":606
 *                 if not seen_bool:
 *                     if seen_datetime:
 *                         if not seen_numeric:             # <<<<<<<<<<<<<<
 *                             return datetimes
 *                     elif seen_timedelta:
 */
            __pyx_t_19 = (!__pyx_v_seen_numeric);
            if (__pyx_t_19) {

              /* "pandas/src/inference.pyx":607
 *                     if seen_datetime:
 *                         if not seen_numeric:
 *                             return datetimes             # <<<<<<<<<<<<<<
 *                     elif seen_timedelta:
 *                         if not seen_numeric:
 */
              __Pyx_XDECREF(__pyx_r);
              if (unlikely(!__pyx_v_datetimes)) { __Pyx_RaiseUnboundLocalError("datetimes"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
              __Pyx_INCREF(__pyx_v_datetimes);
              __pyx_r = __pyx_v_datetimes;
              goto __pyx_L0;
              goto __pyx_L49;
            }
            __pyx_L49:;
            goto __pyx_L48;
          }

          /* "pandas/src/inference.pyx":608
 *                         if not seen_numeric:
 *                             return datetimes
 *                     elif seen_timedelta:             # <<<<<<<<<<<<<<
 *                         if not seen_numeric:
 *                             return timedeltas
 */
          if (__pyx_v_seen_timedelta) {

            /* "pandas/src/inference.pyx":609
 *                             return datetimes
 *                     elif seen_timedelta:
 *                         if not seen_numeric:             # <<<<<<<<<<<<<<
 *                             return timedeltas
 *                     else:
 */
            __pyx_t_19 = (!__pyx_v_seen_numeric);
            if (__pyx_t_19) {

              /* "pandas/src/inference.pyx":610
 *                     elif seen_timedelta:
 *                         if not seen_numeric:
 *                             return timedeltas             # <<<<<<<<<<<<<<
 *                     else:
 *                         if seen_complex:
 */
              __Pyx_XDECREF(__pyx_r);
              if (unlikely(!__pyx_v_timedeltas)) { __Pyx_RaiseUnboundLocalError("timedeltas"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
              __Pyx_INCREF(__pyx_v_timedeltas);
              __pyx_r = __pyx_v_timedeltas;
              goto __pyx_L0;
              goto __pyx_L50;
            }
            __pyx_L50:;
            goto __pyx_L48;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":612
 *                             return timedeltas
 *                     else:
 *                         if seen_complex:             # <<<<<<<<<<<<<<
 *                             if not seen_int:
 *                                 return complexes
 */
            if (__pyx_v_seen_complex) {

              /* "pandas/src/inference.pyx":613
 *                     else:
 *                         if seen_complex:
 *                             if not seen_int:             # <<<<<<<<<<<<<<
 *                                 return complexes
 *                         elif seen_float:
 */
              __pyx_t_19 = (!__pyx_v_seen_int);
              if (__pyx_t_19) {

                /* "pandas/src/inference.pyx":614
 *                         if seen_complex:
 *                             if not seen_int:
 *                                 return complexes             # <<<<<<<<<<<<<<
 *                         elif seen_float:
 *                             if not seen_int:
 */
                __Pyx_XDECREF(__pyx_r);
                __Pyx_INCREF(((PyObject *)__pyx_v_complexes));
                __pyx_r = ((PyObject *)__pyx_v_complexes);
                goto __pyx_L0;
                goto __pyx_L52;
              }
              __pyx_L52:;
              goto __pyx_L51;
            }

            /* "pandas/src/inference.pyx":615
 *                             if not seen_int:
 *                                 return complexes
 *                         elif seen_float:             # <<<<<<<<<<<<<<
 *                             if not seen_int:
 *                                 return floats
 */
            if (__pyx_v_seen_float) {

              /* "pandas/src/inference.pyx":616
 *                                 return complexes
 *                         elif seen_float:
 *                             if not seen_int:             # <<<<<<<<<<<<<<
 *                                 return floats
 *                         elif seen_int:
 */
              __pyx_t_19 = (!__pyx_v_seen_int);
              if (__pyx_t_19) {

                /* "pandas/src/inference.pyx":617
 *                         elif seen_float:
 *                             if not seen_int:
 *                                 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_L53;
              }
              __pyx_L53:;
              goto __pyx_L51;
            }

            /* "pandas/src/inference.pyx":618
 *                             if not seen_int:
 *                                 return floats
 *                         elif seen_int:             # <<<<<<<<<<<<<<
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:
 */
            if (__pyx_v_seen_int) {

              /* "pandas/src/inference.pyx":619
 *                                 return floats
 *                         elif seen_int:
 *                             return ints             # <<<<<<<<<<<<<<
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:
 *                     return bools.view(np.bool_)
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(((PyObject *)__pyx_v_ints));
              __pyx_r = ((PyObject *)__pyx_v_ints);
              goto __pyx_L0;
              goto __pyx_L51;
            }
            __pyx_L51:;
          }
          __pyx_L48:;
          goto __pyx_L47;
        }

        /* "pandas/src/inference.pyx":620
 *                         elif seen_int:
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:             # <<<<<<<<<<<<<<
 *                     return bools.view(np.bool_)
 * 
 */
        __pyx_t_19 = (!__pyx_v_seen_datetime);
        if (__pyx_t_19) {
          __pyx_t_34 = (!__pyx_v_seen_numeric);
          if (__pyx_t_34) {
            __pyx_t_40 = (!__pyx_v_seen_timedelta);
            __pyx_t_39 = __pyx_t_40;
          } else {
            __pyx_t_39 = __pyx_t_34;
          }
          __pyx_t_34 = __pyx_t_39;
        } else {
          __pyx_t_34 = __pyx_t_19;
        }
        if (__pyx_t_34) {

          /* "pandas/src/inference.pyx":621
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric and not seen_timedelta:
 *                     return bools.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 *     return objects
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __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_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;
          goto __pyx_L47;
        }
        __pyx_L47:;
      }
      __pyx_L42:;
    }
    __pyx_L33:;
    goto __pyx_L32;
  }
  __pyx_L32:;

  /* "pandas/src/inference.pyx":623
 *                     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_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_13);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_floats);
  __Pyx_XDECREF((PyObject *)__pyx_v_complexes);
  __Pyx_XDECREF((PyObject *)__pyx_v_ints);
  __Pyx_XDECREF((PyObject *)__pyx_v_bools);
  __Pyx_XDECREF((PyObject *)__pyx_v_idatetimes);
  __Pyx_XDECREF((PyObject *)__pyx_v_itimedeltas);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_onan);
  __Pyx_XDECREF(__pyx_v_datetimes);
  __Pyx_XDECREF(__pyx_v_timedeltas);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_145convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_145convert_sql_column = {__Pyx_NAMESTR("convert_sql_column"), (PyCFunction)__pyx_pw_6pandas_3lib_145convert_sql_column, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_145convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_sql_column (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_144convert_sql_column(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":626
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_144convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_sql_column", 0);

  /* "pandas/src/inference.pyx":627
 * 
 * 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_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __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 = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __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 = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __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.lib.convert_sql_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_147try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_147try_parse_dates = {__Pyx_NAMESTR("try_parse_dates"), (PyCFunction)__pyx_pw_6pandas_3lib_147try_parse_dates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_147try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_parser = 0;
  PyObject *__pyx_v_dayfirst = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_parse_dates (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__parser,&__pyx_n_s__dayfirst,&__pyx_n_s__default,0};
    PyObject* values[4] = {0,0,0,0};

    /* "pandas/src/inference.pyx":629
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,             # <<<<<<<<<<<<<<
 *                     dayfirst=False,default=None):
 *     cdef:
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_60;

    /* "pandas/src/inference.pyx":630
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,
 *                     dayfirst=False,default=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dayfirst);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_dates") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_parser = values[1];
    __pyx_v_dayfirst = values[2];
    __pyx_v_default = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("try_parse_dates", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_146try_parse_dates(__pyx_self, __pyx_v_values, __pyx_v_parser, __pyx_v_dayfirst, __pyx_v_default);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_date (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":647
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 */

static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_date", 0);

  /* "pandas/src/inference.pyx":648
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/src/inference.pyx":649
 *             def parse_date(s):
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     return s
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_61));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_61));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_61));
      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/src/inference.pyx":650
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     return s
 *         # EAFP here
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas.lib.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);

      /* "pandas/src/inference.pyx":651
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 *                     return s             # <<<<<<<<<<<<<<
 *         # EAFP here
 *         try:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_s);
      __pyx_r = __pyx_v_s;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_15try_parse_dates_2lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":645
 *         try:
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 */

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_cur_scope;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (unlikely(!__pyx_cur_scope->__pyx_v_dayfirst)) { __Pyx_RaiseClosureNameError("dayfirst"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dayfirst), __pyx_cur_scope->__pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_v_default)) { __Pyx_RaiseClosureNameError("default"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__default), __pyx_cur_scope->__pyx_v_default) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __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_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_AddTraceback("pandas.lib.try_parse_dates.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":629
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,             # <<<<<<<<<<<<<<
 *                     dayfirst=False,default=None):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_146try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_cur_scope;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_date = NULL;
  PyObject *__pyx_v_parse_date = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject **__pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("try_parse_dates", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates->tp_new(__pyx_ptype_6pandas_3lib___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_cur_scope->__pyx_v_dayfirst = __pyx_v_dayfirst;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dayfirst);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dayfirst);
  __pyx_cur_scope->__pyx_v_default = __pyx_v_default;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":635
 *         ndarray[object] result
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":636
 * 
 *     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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":638
 *     result = np.empty(n, dtype='O')
 * 
 *     if parser is None:             # <<<<<<<<<<<<<<
 *         if default is None: # GH2618
 *            date=datetime.now()
 */
  __pyx_t_11 = (__pyx_v_parser == Py_None);
  if (__pyx_t_11) {

    /* "pandas/src/inference.pyx":639
 * 
 *     if parser is None:
 *         if default is None: # GH2618             # <<<<<<<<<<<<<<
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)
 */
    __pyx_t_11 = (__pyx_cur_scope->__pyx_v_default == Py_None);
    if (__pyx_t_11) {

      /* "pandas/src/inference.pyx":640
 *     if parser is None:
 *         if default is None: # GH2618
 *            date=datetime.now()             # <<<<<<<<<<<<<<
 *            default=datetime(date.year,date.month,1)
 * 
 */
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__now); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_date = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/src/inference.pyx":641
 *         if default is None: # GH2618
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_date, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_date, __pyx_n_s__month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __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_5 = 0;
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_default);
      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_default);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_cur_scope->__pyx_v_default = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":643
 *            default=datetime(date.year,date.month,1)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "pandas/src/inference.pyx":644
 * 
 *         try:
 *             from dateutil.parser import parse             # <<<<<<<<<<<<<<
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)
 *         except ImportError: # pragma: no cover
 */
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(((PyObject *)__pyx_n_s__parse));
        PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__parse));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse));
        __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_62), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__parse);
        if (__pyx_t_5 == NULL) {
          if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__parse);
          if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_cur_scope->__pyx_v_parse = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pandas/src/inference.pyx":645
 *         try:
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 */
        __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_2lambda1, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_63, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_parse_date = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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;

      /* "pandas/src/inference.pyx":646
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)
 *         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.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_2);

        /* "pandas/src/inference.pyx":647
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 */
        __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date, 0, NULL, __pyx_n_s_63, ((PyObject *)__pyx_k_codeobj_65)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF(__pyx_v_parse_date);
        __pyx_v_parse_date = __pyx_t_3;
        __pyx_t_3 = 0;
        __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_L6_exception_handled;
      }
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_L12_try_end:;
    }

    /* "pandas/src/inference.pyx":653
 *                     return s
 *         # EAFP here
 *         try:             # <<<<<<<<<<<<<<
 *             for i from 0 <= i < n:
 *                 if values[i] == '':
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "pandas/src/inference.pyx":654
 *         # EAFP here
 *         try:
 *             for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *                 if values[i] == '':
 *                     result[i] = np.nan
 */
        __pyx_t_1 = __pyx_v_n;
        for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

          /* "pandas/src/inference.pyx":655
 *         try:
 *             for i from 0 <= i < n:
 *                 if values[i] == '':             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
          __pyx_t_12 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_12 < 0) {
            __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
            if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          }
          __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_2);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_67), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_11) {

            /* "pandas/src/inference.pyx":656
 *             for i from 0 <= i < n:
 *                 if values[i] == '':
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 *                     result[i] = parse_date(values[i])
 */
            __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_13 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_13 < 0) {
              __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            }
            __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_14);
            __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_14);
            *__pyx_t_14 = __pyx_t_2;
            __Pyx_GIVEREF(*__pyx_t_14);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L25;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":658
 *                     result[i] = np.nan
 *                 else:
 *                     result[i] = parse_date(values[i])             # <<<<<<<<<<<<<<
 *         except Exception:
 *             # failed
 */
            __pyx_t_15 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_15 < 0) {
              __pyx_t_15 += __pyx_pybuffernd_values.diminfo[0].shape;
              if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            }
            __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides);
            __Pyx_INCREF((PyObject*)__pyx_t_2);
            __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
            __pyx_t_16 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_16 < 0) {
              __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            }
            __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_14);
            __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_14);
            *__pyx_t_14 = __pyx_t_2;
            __Pyx_GIVEREF(*__pyx_t_14);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __pyx_L25:;
        }
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L22_try_end;
      __pyx_L15_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/src/inference.pyx":659
 *                 else:
 *                     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.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);

        /* "pandas/src/inference.pyx":661
 *         except Exception:
 *             # failed
 *             return values             # <<<<<<<<<<<<<<
 *     else:
 *         parse_date = parser
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_values));
        __pyx_r = ((PyObject *)__pyx_v_values);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L18_except_return;
        __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_L16_exception_handled;
      }
      __pyx_L17_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L18_except_return:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L0;
      __pyx_L16_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_L22_try_end:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":663
 *             return values
 *     else:
 *         parse_date = parser             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __Pyx_INCREF(__pyx_v_parser);
    __pyx_v_parse_date = __pyx_v_parser;

    /* "pandas/src/inference.pyx":665
 *         parse_date = parser
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i from 0 <= i < n:
 *                 if values[i] == '':
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "pandas/src/inference.pyx":666
 * 
 *         try:
 *             for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *                 if values[i] == '':
 *                     result[i] = np.nan
 */
        __pyx_t_1 = __pyx_v_n;
        for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

          /* "pandas/src/inference.pyx":667
 *         try:
 *             for i from 0 <= i < n:
 *                 if values[i] == '':             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape;
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          }
          __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_4);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_67), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_11) {

            /* "pandas/src/inference.pyx":668
 *             for i from 0 <= i < n:
 *                 if values[i] == '':
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 *                     result[i] = parse_date(values[i])
 */
            __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_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[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_18 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_18 < 0) {
              __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            }
            __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_14);
            __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_14);
            *__pyx_t_14 = __pyx_t_4;
            __Pyx_GIVEREF(*__pyx_t_14);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L38;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":670
 *                     result[i] = np.nan
 *                 else:
 *                     result[i] = parse_date(values[i])             # <<<<<<<<<<<<<<
 *         except Exception:
 *             # raise if passed parser and it failed
 */
            __pyx_t_19 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_19 < 0) {
              __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape;
              if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            }
            __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides);
            __Pyx_INCREF((PyObject*)__pyx_t_4);
            __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            __Pyx_GOTREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_4 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
            __pyx_t_20 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_20 < 0) {
              __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
            if (unlikely(__pyx_t_7 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_7);
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            }
            __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_14);
            __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_14);
            *__pyx_t_14 = __pyx_t_4;
            __Pyx_GIVEREF(*__pyx_t_14);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __pyx_L38:;
        }
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L35_try_end;
      __pyx_L28_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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;

      /* "pandas/src/inference.pyx":671
 *                 else:
 *                     result[i] = parse_date(values[i])
 *         except Exception:             # <<<<<<<<<<<<<<
 *             # raise if passed parser and it failed
 *             raise
 */
      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_2);

        /* "pandas/src/inference.pyx":673
 *         except Exception:
 *             # raise if passed parser and it failed
 *             raise             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_2);
        __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = 0; 
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
        __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_L29_exception_handled;
      }
      __pyx_L30_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L29_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_L35_try_end:;
    }
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":675
 *             raise
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_149try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_149try_parse_date_and_time = {__Pyx_NAMESTR("try_parse_date_and_time"), (PyCFunction)__pyx_pw_6pandas_3lib_149try_parse_date_and_time, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_149try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_dates = 0;
  PyArrayObject *__pyx_v_times = 0;
  PyObject *__pyx_v_date_parser = 0;
  PyObject *__pyx_v_time_parser = 0;
  PyObject *__pyx_v_dayfirst = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_parse_date_and_time (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dates,&__pyx_n_s__times,&__pyx_n_s__date_parser,&__pyx_n_s__time_parser,&__pyx_n_s__dayfirst,&__pyx_n_s__default,0};
    PyObject* values[6] = {0,0,0,0,0,0};

    /* "pandas/src/inference.pyx":678
 * 
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,
 *                             date_parser=None, time_parser=None,             # <<<<<<<<<<<<<<
 *                             dayfirst=False,default=None):
 *     cdef:
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = __pyx_k_68;

    /* "pandas/src/inference.pyx":679
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,
 *                             date_parser=None, time_parser=None,
 *                             dayfirst=False,default=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
    values[5] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dates)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_date_and_time", 0, 2, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__date_parser);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__time_parser);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dayfirst);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_date_and_time") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dates = ((PyArrayObject *)values[0]);
    __pyx_v_times = ((PyArrayObject *)values[1]);
    __pyx_v_date_parser = values[2];
    __pyx_v_time_parser = values[3];
    __pyx_v_dayfirst = values[4];
    __pyx_v_default = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("try_parse_date_and_time", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dates), __pyx_ptype_5numpy_ndarray, 1, "dates", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_times), __pyx_ptype_5numpy_ndarray, 1, "times", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_148try_parse_date_and_time(__pyx_self, __pyx_v_dates, __pyx_v_times, __pyx_v_date_parser, __pyx_v_time_parser, __pyx_v_dayfirst, __pyx_v_default);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_date (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":700
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return date.strptime(s, '%m/%d/%Y')
 */

static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_date", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pandas/src/inference.pyx":701
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return date.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/src/inference.pyx":702
 *             def parse_date(s):
 *                 try:
 *                     return date.strptime(s, '%m/%d/%Y')             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     return s
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_date)) { __Pyx_RaiseClosureNameError("date"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
      __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_61));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_61));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_61));
      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/src/inference.pyx":703
 *                 try:
 *                     return date.strptime(s, '%m/%d/%Y')
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     return s
 *     else:
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);

      /* "pandas/src/inference.pyx":704
 *                     return date.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 *                     return s             # <<<<<<<<<<<<<<
 *     else:
 *         parse_date = date_parser
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_s);
      __pyx_r = __pyx_v_s;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_3parse_time = {__Pyx_NAMESTR("parse_time"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_time (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":713
 *             parse_time = lambda x: parse(x)
 *         except ImportError: # pragma: no cover
 *             def parse_time(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return time.strptime(s, '%H:%M:%S')
 */

static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_time", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pandas/src/inference.pyx":714
 *         except ImportError: # pragma: no cover
 *             def parse_time(s):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return time.strptime(s, '%H:%M:%S')
 *                 except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/src/inference.pyx":715
 *             def parse_time(s):
 *                 try:
 *                     return time.strptime(s, '%H:%M:%S')             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     return s
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_time)) { __Pyx_RaiseClosureNameError("time"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
      __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_time, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_69));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_69));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_69));
      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/src/inference.pyx":716
 *                 try:
 *                     return time.strptime(s, '%H:%M:%S')
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     return s
 * 
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);

      /* "pandas/src/inference.pyx":717
 *                     return time.strptime(s, '%H:%M:%S')
 *                 except Exception:
 *                     return s             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_s);
      __pyx_r = __pyx_v_s;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_4lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":698
 *         try:
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 */

static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (unlikely(!__pyx_cur_scope->__pyx_v_dayfirst)) { __Pyx_RaiseClosureNameError("dayfirst"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dayfirst), __pyx_cur_scope->__pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_v_default)) { __Pyx_RaiseClosureNameError("default"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__default), __pyx_cur_scope->__pyx_v_default) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __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_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_AddTraceback("pandas.lib.try_parse_date_and_time.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_5lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":711
 *         try:
 *             from dateutil.parser import parse
 *             parse_time = lambda x: parse(x)             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_time(s):
 */

static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __pyx_t_2 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__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.lib.try_parse_date_and_time.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":677
 *     return result
 * 
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,             # <<<<<<<<<<<<<<
 *                             date_parser=None, time_parser=None,
 *                             dayfirst=False,default=None):
 */

static PyObject *__pyx_pf_6pandas_3lib_148try_parse_date_and_time(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dates, PyArrayObject *__pyx_v_times, PyObject *__pyx_v_date_parser, PyObject *__pyx_v_time_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_datetime = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_timedelta = NULL;
  PyObject *__pyx_v_parse_date = NULL;
  PyObject *__pyx_v_parse_time = NULL;
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_v_t = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dates;
  __Pyx_Buffer __pyx_pybuffer_dates;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_times;
  __Pyx_Buffer __pyx_pybuffer_times;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  PyObject **__pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("try_parse_date_and_time", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time->tp_new(__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_dayfirst = __pyx_v_dayfirst;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dayfirst);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dayfirst);
  __pyx_cur_scope->__pyx_v_default = __pyx_v_default;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_dates.pybuffer.buf = NULL;
  __pyx_pybuffer_dates.refcount = 0;
  __pyx_pybuffernd_dates.data = NULL;
  __pyx_pybuffernd_dates.rcbuffer = &__pyx_pybuffer_dates;
  __pyx_pybuffer_times.pybuffer.buf = NULL;
  __pyx_pybuffer_times.refcount = 0;
  __pyx_pybuffernd_times.data = NULL;
  __pyx_pybuffernd_times.rcbuffer = &__pyx_pybuffer_times;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_dates, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dates.diminfo[0].strides = __pyx_pybuffernd_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dates.diminfo[0].shape = __pyx_pybuffernd_dates.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_times.rcbuffer->pybuffer, (PyObject*)__pyx_v_times, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_times.diminfo[0].strides = __pyx_pybuffernd_times.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_times.diminfo[0].shape = __pyx_pybuffernd_times.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":684
 *         ndarray[object] result
 * 
 *     from datetime import date, time, datetime, timedelta             # <<<<<<<<<<<<<<
 * 
 *     n = len(dates)
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__time));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__timedelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __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__date);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__date);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_date = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__time);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__time);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_time = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__timedelta);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_timedelta = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":686
 *     from datetime import date, time, datetime, timedelta
 * 
 *     n = len(dates)             # <<<<<<<<<<<<<<
 *     if len(times) != n:
 *         raise ValueError('Length of dates and times must be equal')
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_dates)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":687
 * 
 *     n = len(dates)
 *     if len(times) != n:             # <<<<<<<<<<<<<<
 *         raise ValueError('Length of dates and times must be equal')
 *     result = np.empty(n, dtype='O')
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_times)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_3 != __pyx_v_n);
  if (__pyx_t_4) {

    /* "pandas/src/inference.pyx":688
 *     n = len(dates)
 *     if len(times) != n:
 *         raise ValueError('Length of dates and times must be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":689
 *     if len(times) != n:
 *         raise ValueError('Length of dates and times must be equal')
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if date_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 = 689; __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 = 689; __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 = 689; __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[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __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 = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __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;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/inference.pyx":691
 *     result = np.empty(n, dtype='O')
 * 
 *     if date_parser is None:             # <<<<<<<<<<<<<<
 *         if default is None: # GH2618
 *            date=datetime.now()
 */
  __pyx_t_4 = (__pyx_v_date_parser == Py_None);
  if (__pyx_t_4) {

    /* "pandas/src/inference.pyx":692
 * 
 *     if date_parser is None:
 *         if default is None: # GH2618             # <<<<<<<<<<<<<<
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)
 */
    __pyx_t_4 = (__pyx_cur_scope->__pyx_v_default == Py_None);
    if (__pyx_t_4) {

      /* "pandas/src/inference.pyx":693
 *     if date_parser is None:
 *         if default is None: # GH2618
 *            date=datetime.now()             # <<<<<<<<<<<<<<
 *            default=datetime(date.year,date.month,1)
 * 
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_datetime, __pyx_n_s__now); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_date);
      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_date);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_cur_scope->__pyx_v_date = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/src/inference.pyx":694
 *         if default is None: # GH2618
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_2 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_default);
      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_default);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_cur_scope->__pyx_v_default = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/src/inference.pyx":696
 *            default=datetime(date.year,date.month,1)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      /*try:*/ {

        /* "pandas/src/inference.pyx":697
 * 
 *         try:
 *             from dateutil.parser import parse             # <<<<<<<<<<<<<<
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)
 *         except ImportError: # pragma: no cover
 */
        __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(((PyObject *)__pyx_n_s__parse));
        PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__parse));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse));
        __pyx_t_5 = __Pyx_Import(((PyObject *)__pyx_n_s_62), ((PyObject *)__pyx_t_6), -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__parse);
        if (__pyx_t_6 == NULL) {
          if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__parse);
          if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        }
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_cur_scope->__pyx_v_parse = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pandas/src/inference.pyx":698
 *         try:
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 */
        __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_4lambda2, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_63, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_parse_date = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/src/inference.pyx":699
 *             from dateutil.parser import parse
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)
 *         except ImportError: # pragma: no cover             # <<<<<<<<<<<<<<
 *             def parse_date(s):
 *                 try:
 */
      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_2);

        /* "pandas/src/inference.pyx":700
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return date.strptime(s, '%m/%d/%Y')
 */
        __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_1parse_date, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_63, ((PyObject *)__pyx_k_codeobj_73)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF(__pyx_v_parse_date);
        __pyx_v_parse_date = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      __pyx_L13_try_end:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":706
 *                     return s
 *     else:
 *         parse_date = date_parser             # <<<<<<<<<<<<<<
 * 
 *     if time_parser is None:
 */
    __Pyx_INCREF(__pyx_v_date_parser);
    __pyx_v_parse_date = __pyx_v_date_parser;
  }
  __pyx_L4:;

  /* "pandas/src/inference.pyx":708
 *         parse_date = date_parser
 * 
 *     if time_parser is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from dateutil.parser import parse
 */
  __pyx_t_4 = (__pyx_v_time_parser == Py_None);
  if (__pyx_t_4) {

    /* "pandas/src/inference.pyx":709
 * 
 *     if time_parser is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from dateutil.parser import parse
 *             parse_time = lambda x: parse(x)
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      /*try:*/ {

        /* "pandas/src/inference.pyx":710
 *     if time_parser is None:
 *         try:
 *             from dateutil.parser import parse             # <<<<<<<<<<<<<<
 *             parse_time = lambda x: parse(x)
 *         except ImportError: # pragma: no cover
 */
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(((PyObject *)__pyx_n_s__parse));
        PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__parse));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse));
        __pyx_t_6 = __Pyx_Import(((PyObject *)__pyx_n_s_62), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__parse);
        if (__pyx_t_2 == NULL) {
          if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__parse);
          if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_parse);
        __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_parse);
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_v_parse = __pyx_t_2;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pandas/src/inference.pyx":711
 *         try:
 *             from dateutil.parser import parse
 *             parse_time = lambda x: parse(x)             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_time(s):
 */
        __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_5lambda3, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_63, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_v_parse_time = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L24_try_end;
      __pyx_L17_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pandas/src/inference.pyx":712
 *             from dateutil.parser import parse
 *             parse_time = lambda x: parse(x)
 *         except ImportError: # pragma: no cover             # <<<<<<<<<<<<<<
 *             def parse_time(s):
 *                 try:
 */
      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);

        /* "pandas/src/inference.pyx":713
 *             parse_time = lambda x: parse(x)
 *         except ImportError: # pragma: no cover
 *             def parse_time(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return time.strptime(s, '%H:%M:%S')
 */
        __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_3parse_time, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_63, ((PyObject *)__pyx_k_codeobj_75)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF(__pyx_v_parse_time);
        __pyx_v_parse_time = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L18_exception_handled;
      }
      __pyx_L19_except_error:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L1_error;
      __pyx_L18_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_L24_try_end:;
    }
    goto __pyx_L16;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":720
 * 
 *     else:
 *         parse_time = time_parser             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
    __Pyx_INCREF(__pyx_v_time_parser);
    __pyx_v_parse_time = __pyx_v_time_parser;
  }
  __pyx_L16:;

  /* "pandas/src/inference.pyx":722
 *         parse_time = time_parser
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         d = parse_date(str(dates[i]))
 *         t = parse_time(str(times[i]))
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":723
 * 
 *     for i from 0 <= i < n:
 *         d = parse_date(str(dates[i]))             # <<<<<<<<<<<<<<
 *         t = parse_time(str(times[i]))
 *         result[i] = datetime(d.year, d.month, d.day,
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_dates.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_dates.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_dates.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_dates.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_d);
    __pyx_v_d = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/inference.pyx":724
 *     for i from 0 <= i < n:
 *         d = parse_date(str(dates[i]))
 *         t = parse_time(str(times[i]))             # <<<<<<<<<<<<<<
 *         result[i] = datetime(d.year, d.month, d.day,
 *                              t.hour, t.minute, t.second)
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_times.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_times.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_times.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_times.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_parse_time, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_t);
    __pyx_v_t = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/inference.pyx":725
 *         d = parse_date(str(dates[i]))
 *         t = parse_time(str(times[i]))
 *         result[i] = datetime(d.year, d.month, d.day,             # <<<<<<<<<<<<<<
 *                              t.hour, t.minute, t.second)
 * 
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);

    /* "pandas/src/inference.pyx":726
 *         t = parse_time(str(times[i]))
 *         result[i] = datetime(d.year, d.month, d.day,
 *                              t.hour, t.minute, t.second)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_14 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__minute); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__second); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = PyTuple_New(6); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_15);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_15 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;

    /* "pandas/src/inference.pyx":725
 *         d = parse_date(str(dates[i]))
 *         t = parse_time(str(times[i]))
 *         result[i] = datetime(d.year, d.month, d.day,             # <<<<<<<<<<<<<<
 *                              t.hour, t.minute, t.second)
 * 
 */
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_18 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_18);
    __Pyx_INCREF(__pyx_t_15); __Pyx_DECREF(*__pyx_t_18);
    *__pyx_t_18 = __pyx_t_15;
    __Pyx_GIVEREF(*__pyx_t_18);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }

  /* "pandas/src/inference.pyx":728
 *                              t.hour, t.minute, t.second)
 * 
 *     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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_14);
  __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_pybuffernd_dates.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_times.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dates.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_times.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_timedelta);
  __Pyx_XDECREF(__pyx_v_parse_date);
  __Pyx_XDECREF(__pyx_v_parse_time);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_151try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_151try_parse_year_month_day = {__Pyx_NAMESTR("try_parse_year_month_day"), (PyCFunction)__pyx_pw_6pandas_3lib_151try_parse_year_month_day, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_151try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_years = 0;
  PyArrayObject *__pyx_v_months = 0;
  PyArrayObject *__pyx_v_days = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_parse_year_month_day (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__years,&__pyx_n_s__months,&__pyx_n_s__days,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__years)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__months)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__days)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_year_month_day") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_years = ((PyArrayObject *)values[0]);
    __pyx_v_months = ((PyArrayObject *)values[1]);
    __pyx_v_days = ((PyArrayObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.try_parse_year_month_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_years), __pyx_ptype_5numpy_ndarray, 1, "years", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_months), __pyx_ptype_5numpy_ndarray, 1, "months", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_days), __pyx_ptype_5numpy_ndarray, 1, "days", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_150try_parse_year_month_day(__pyx_self, __pyx_v_years, __pyx_v_months, __pyx_v_days);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":731
 * 
 * 
 * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months,             # <<<<<<<<<<<<<<
 *                              ndarray[object] days):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_150try_parse_year_month_day(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_datetime = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_days;
  __Pyx_Buffer __pyx_pybuffer_days;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_months;
  __Pyx_Buffer __pyx_pybuffer_months;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_years;
  __Pyx_Buffer __pyx_pybuffer_years;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject **__pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("try_parse_year_month_day", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_years.pybuffer.buf = NULL;
  __pyx_pybuffer_years.refcount = 0;
  __pyx_pybuffernd_years.data = NULL;
  __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years;
  __pyx_pybuffer_months.pybuffer.buf = NULL;
  __pyx_pybuffer_months.refcount = 0;
  __pyx_pybuffernd_months.data = NULL;
  __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months;
  __pyx_pybuffer_days.pybuffer.buf = NULL;
  __pyx_pybuffer_days.refcount = 0;
  __pyx_pybuffernd_days.data = NULL;
  __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":737
 *         ndarray[object] result
 * 
 *     from datetime import datetime             # <<<<<<<<<<<<<<
 * 
 *     n = len(years)
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":739
 *     from datetime import datetime
 * 
 *     n = len(years)             # <<<<<<<<<<<<<<
 *     if len(months) != n or len(days) != n:
 *         raise ValueError('Length of years/months/days must all be equal')
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_years)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":740
 * 
 *     n = len(years)
 *     if len(months) != n or len(days) != n:             # <<<<<<<<<<<<<<
 *         raise ValueError('Length of years/months/days must all be equal')
 *     result = np.empty(n, dtype='O')
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_months)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_3 != __pyx_v_n);
  if (!__pyx_t_4) {
    __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_days)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = (__pyx_t_3 != __pyx_v_n);
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":741
 *     n = len(years)
 *     if len(months) != n or len(days) != n:
 *         raise ValueError('Length of years/months/days must all be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":742
 *     if len(months) != n or len(days) != n:
 *         raise ValueError('Length of years/months/days must all be equal')
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __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 = 742; __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 = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __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 = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __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_7)); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/src/inference.pyx":744
 *     result = np.empty(n, dtype='O')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]))
 * 
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":745
 * 
 *     for i from 0 <= i < n:
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]))             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_years.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_years.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_8);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_15 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_15 < 0) {
      __pyx_t_15 += __pyx_pybuffernd_months.diminfo[0].shape;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_months.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_16 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_16 < 0) {
      __pyx_t_16 += __pyx_pybuffernd_days.diminfo[0].shape;
      if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_days.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_7);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_8 = 0;
    __pyx_t_2 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_18 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_18);
    __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_18);
    *__pyx_t_18 = __pyx_t_7;
    __Pyx_GIVEREF(*__pyx_t_18);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }

  /* "pandas/src/inference.pyx":747
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]))
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def try_parse_datetime_components(ndarray[object] years,
 */
  __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.try_parse_year_month_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_153try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_153try_parse_datetime_components = {__Pyx_NAMESTR("try_parse_datetime_components"), (PyCFunction)__pyx_pw_6pandas_3lib_153try_parse_datetime_components, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_153try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_years = 0;
  PyArrayObject *__pyx_v_months = 0;
  PyArrayObject *__pyx_v_days = 0;
  PyArrayObject *__pyx_v_hours = 0;
  PyArrayObject *__pyx_v_minutes = 0;
  PyArrayObject *__pyx_v_seconds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_parse_datetime_components (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__years,&__pyx_n_s__months,&__pyx_n_s__days,&__pyx_n_s__hours,&__pyx_n_s__minutes,&__pyx_n_s__seconds,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__years)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__months)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__days)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hours)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minutes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seconds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_datetime_components") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_years = ((PyArrayObject *)values[0]);
    __pyx_v_months = ((PyArrayObject *)values[1]);
    __pyx_v_days = ((PyArrayObject *)values[2]);
    __pyx_v_hours = ((PyArrayObject *)values[3]);
    __pyx_v_minutes = ((PyArrayObject *)values[4]);
    __pyx_v_seconds = ((PyArrayObject *)values[5]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.try_parse_datetime_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_years), __pyx_ptype_5numpy_ndarray, 1, "years", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_months), __pyx_ptype_5numpy_ndarray, 1, "months", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_days), __pyx_ptype_5numpy_ndarray, 1, "days", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hours), __pyx_ptype_5numpy_ndarray, 1, "hours", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_minutes), __pyx_ptype_5numpy_ndarray, 1, "minutes", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seconds), __pyx_ptype_5numpy_ndarray, 1, "seconds", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_152try_parse_datetime_components(__pyx_self, __pyx_v_years, __pyx_v_months, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":749
 *     return result
 * 
 * def try_parse_datetime_components(ndarray[object] years,             # <<<<<<<<<<<<<<
 *                                   ndarray[object] months,
 *                                   ndarray[object] days,
 */

static PyObject *__pyx_pf_6pandas_3lib_152try_parse_datetime_components(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days, PyArrayObject *__pyx_v_hours, PyArrayObject *__pyx_v_minutes, PyArrayObject *__pyx_v_seconds) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  int __pyx_v_secs;
  double __pyx_v_float_secs;
  double __pyx_v_micros;
  PyObject *__pyx_v_datetime = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_days;
  __Pyx_Buffer __pyx_pybuffer_days;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_hours;
  __Pyx_Buffer __pyx_pybuffer_hours;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_minutes;
  __Pyx_Buffer __pyx_pybuffer_minutes;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_months;
  __Pyx_Buffer __pyx_pybuffer_months;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seconds;
  __Pyx_Buffer __pyx_pybuffer_seconds;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_years;
  __Pyx_Buffer __pyx_pybuffer_years;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  double __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;
  PyObject *__pyx_t_23 = NULL;
  Py_ssize_t __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  Py_ssize_t __pyx_t_28;
  PyObject **__pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("try_parse_datetime_components", 0);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_years.pybuffer.buf = NULL;
  __pyx_pybuffer_years.refcount = 0;
  __pyx_pybuffernd_years.data = NULL;
  __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years;
  __pyx_pybuffer_months.pybuffer.buf = NULL;
  __pyx_pybuffer_months.refcount = 0;
  __pyx_pybuffernd_months.data = NULL;
  __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months;
  __pyx_pybuffer_days.pybuffer.buf = NULL;
  __pyx_pybuffer_days.refcount = 0;
  __pyx_pybuffernd_days.data = NULL;
  __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days;
  __pyx_pybuffer_hours.pybuffer.buf = NULL;
  __pyx_pybuffer_hours.refcount = 0;
  __pyx_pybuffernd_hours.data = NULL;
  __pyx_pybuffernd_hours.rcbuffer = &__pyx_pybuffer_hours;
  __pyx_pybuffer_minutes.pybuffer.buf = NULL;
  __pyx_pybuffer_minutes.refcount = 0;
  __pyx_pybuffernd_minutes.data = NULL;
  __pyx_pybuffernd_minutes.rcbuffer = &__pyx_pybuffer_minutes;
  __pyx_pybuffer_seconds.pybuffer.buf = NULL;
  __pyx_pybuffer_seconds.refcount = 0;
  __pyx_pybuffernd_seconds.data = NULL;
  __pyx_pybuffernd_seconds.rcbuffer = &__pyx_pybuffer_seconds;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_hours, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_hours.diminfo[0].strides = __pyx_pybuffernd_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_hours.diminfo[0].shape = __pyx_pybuffernd_hours.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_v_minutes, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_minutes.diminfo[0].strides = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minutes.diminfo[0].shape = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_v_seconds, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_seconds.diminfo[0].strides = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seconds.diminfo[0].shape = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":763
 *         double micros
 * 
 *     from datetime import datetime             # <<<<<<<<<<<<<<
 * 
 *     n = len(years)
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":765
 *     from datetime import datetime
 * 
 *     n = len(years)             # <<<<<<<<<<<<<<
 *     if (len(months) != n or len(days) != n or len(hours) != n or
 *         len(minutes) != n or len(seconds) != n):
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_years)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":766
 * 
 *     n = len(years)
 *     if (len(months) != n or len(days) != n or len(hours) != n or             # <<<<<<<<<<<<<<
 *         len(minutes) != n or len(seconds) != n):
 *         raise ValueError('Length of all datetime components must be equal')
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_months)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_t_3 != __pyx_v_n);
  if (!__pyx_t_4) {
    __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_days)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = (__pyx_t_3 != __pyx_v_n);
    if (!__pyx_t_5) {
      __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_hours)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = (__pyx_t_3 != __pyx_v_n);
      if (!__pyx_t_6) {

        /* "pandas/src/inference.pyx":767
 *     n = len(years)
 *     if (len(months) != n or len(days) != n or len(hours) != n or
 *         len(minutes) != n or len(seconds) != n):             # <<<<<<<<<<<<<<
 *         raise ValueError('Length of all datetime components must be equal')
 *     result = np.empty(n, dtype='O')
 */
        __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_minutes)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = (__pyx_t_3 != __pyx_v_n);
        if (!__pyx_t_7) {
          __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_seconds)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = (__pyx_t_3 != __pyx_v_n);
          __pyx_t_9 = __pyx_t_8;
        } else {
          __pyx_t_9 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_9;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  if (__pyx_t_5) {

    /* "pandas/src/inference.pyx":768
 *     if (len(months) != n or len(days) != n or len(hours) != n or
 *         len(minutes) != n or len(seconds) != n):
 *         raise ValueError('Length of all datetime components must be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":769
 *         len(minutes) != n or len(seconds) != n):
 *         raise ValueError('Length of all datetime components must be equal')
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __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 = 769; __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 = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __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 = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __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_10)); __pyx_t_10 = 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[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_11);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_13 < 0)) {
      PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pandas/src/inference.pyx":771
 *     result = np.empty(n, dtype='O')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         float_secs = float(seconds[i])
 *         secs = int(float_secs)
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":772
 * 
 *     for i from 0 <= i < n:
 *         float_secs = float(seconds[i])             # <<<<<<<<<<<<<<
 *         secs = int(float_secs)
 * 
 */
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_seconds.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_seconds.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seconds.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_11);
    __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_11); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_float_secs = __pyx_t_18;

    /* "pandas/src/inference.pyx":773
 *     for i from 0 <= i < n:
 *         float_secs = float(seconds[i])
 *         secs = int(float_secs)             # <<<<<<<<<<<<<<
 * 
 *         micros = float_secs - secs
 */
    __pyx_v_secs = ((int)__pyx_v_float_secs);

    /* "pandas/src/inference.pyx":775
 *         secs = int(float_secs)
 * 
 *         micros = float_secs - secs             # <<<<<<<<<<<<<<
 *         if micros > 0:
 *             micros = micros * 1000000
 */
    __pyx_v_micros = (__pyx_v_float_secs - __pyx_v_secs);

    /* "pandas/src/inference.pyx":776
 * 
 *         micros = float_secs - secs
 *         if micros > 0:             # <<<<<<<<<<<<<<
 *             micros = micros * 1000000
 * 
 */
    __pyx_t_5 = (__pyx_v_micros > 0.0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":777
 *         micros = float_secs - secs
 *         if micros > 0:
 *             micros = micros * 1000000             # <<<<<<<<<<<<<<
 * 
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]),
 */
      __pyx_v_micros = (__pyx_v_micros * 1000000.0);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/src/inference.pyx":779
 *             micros = micros * 1000000
 * 
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]),             # <<<<<<<<<<<<<<
 *                              int(hours[i]), int(minutes[i]), secs,
 *                              int(micros))
 */
    __pyx_t_19 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_19 < 0) {
      __pyx_t_19 += __pyx_pybuffernd_years.diminfo[0].shape;
      if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_years.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_11);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_20 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_pybuffernd_months.diminfo[0].shape;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_months.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_t_21 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_pybuffernd_days.diminfo[0].shape;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_10 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_days.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_10);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

    /* "pandas/src/inference.pyx":780
 * 
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]),
 *                              int(hours[i]), int(minutes[i]), secs,             # <<<<<<<<<<<<<<
 *                              int(micros))
 * 
 */
    __pyx_t_22 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_22 < 0) {
      __pyx_t_22 += __pyx_pybuffernd_hours.diminfo[0].shape;
      if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_hours.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_hours.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_23);
    PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
    __pyx_t_24 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_24 < 0) {
      __pyx_t_24 += __pyx_pybuffernd_minutes.diminfo[0].shape;
      if (unlikely(__pyx_t_24 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_minutes.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_23 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minutes.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_23);
    __pyx_t_25 = PyTuple_New(1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_25);
    PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_23);
    __Pyx_GIVEREF(__pyx_t_23);
    __pyx_t_23 = 0;
    __pyx_t_23 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_25), NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_23);
    __Pyx_DECREF(((PyObject *)__pyx_t_25)); __pyx_t_25 = 0;
    __pyx_t_25 = PyInt_FromLong(__pyx_v_secs); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_25);

    /* "pandas/src/inference.pyx":781
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]),
 *                              int(hours[i]), int(minutes[i]), secs,
 *                              int(micros))             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_26 = PyFloat_FromDouble(__pyx_v_micros); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_27 = PyTuple_New(1); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_27);
    PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_26);
    __Pyx_GIVEREF(__pyx_t_26);
    __pyx_t_26 = 0;
    __pyx_t_26 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_27), NULL); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);
    __Pyx_DECREF(((PyObject *)__pyx_t_27)); __pyx_t_27 = 0;
    __pyx_t_27 = PyTuple_New(7); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_27);
    PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_27, 2, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_27, 3, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_27, 4, __pyx_t_23);
    __Pyx_GIVEREF(__pyx_t_23);
    PyTuple_SET_ITEM(__pyx_t_27, 5, __pyx_t_25);
    __Pyx_GIVEREF(__pyx_t_25);
    PyTuple_SET_ITEM(__pyx_t_27, 6, __pyx_t_26);
    __Pyx_GIVEREF(__pyx_t_26);
    __pyx_t_11 = 0;
    __pyx_t_2 = 0;
    __pyx_t_10 = 0;
    __pyx_t_1 = 0;
    __pyx_t_23 = 0;
    __pyx_t_25 = 0;
    __pyx_t_26 = 0;
    __pyx_t_26 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_27), NULL); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);
    __Pyx_DECREF(((PyObject *)__pyx_t_27)); __pyx_t_27 = 0;

    /* "pandas/src/inference.pyx":779
 *             micros = micros * 1000000
 * 
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]),             # <<<<<<<<<<<<<<
 *                              int(hours[i]), int(minutes[i]), secs,
 *                              int(micros))
 */
    __pyx_t_28 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_28 < 0) {
      __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_28 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_29 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_29);
    __Pyx_INCREF(__pyx_t_26); __Pyx_DECREF(*__pyx_t_29);
    *__pyx_t_29 = __pyx_t_26;
    __Pyx_GIVEREF(*__pyx_t_29);
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  }

  /* "pandas/src/inference.pyx":783
 *                              int(micros))
 * 
 *     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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.try_parse_datetime_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_155sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_155sanitize_objects = {__Pyx_NAMESTR("sanitize_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_155sanitize_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_155sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_na_values = 0;
  PyObject *__pyx_v_convert_empty = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sanitize_objects (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,&__pyx_n_s__convert_empty,0};
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_80;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sanitize_objects", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_empty);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sanitize_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_na_values = ((PyObject*)values[1]);
    __pyx_v_convert_empty = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sanitize_objects", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.sanitize_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __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 = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_154sanitize_objects(__pyx_self, __pyx_v_values, __pyx_v_na_values, __pyx_v_convert_empty);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":785
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                      convert_empty=True):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_154sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_onan = 0;
  Py_ssize_t __pyx_v_na_count;
  PyObject *__pyx_v_memo = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject **__pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sanitize_objects", 0);
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":790
 *         Py_ssize_t i, n
 *         object val, onan
 *         Py_ssize_t na_count = 0             # <<<<<<<<<<<<<<
 *         dict memo = {}
 * 
 */
  __pyx_v_na_count = 0;

  /* "pandas/src/inference.pyx":791
 *         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 = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_memo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":793
 *         dict memo = {}
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     onan = np.nan
 * 
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/inference.pyx":794
 * 
 *     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 = 794; __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 = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_onan = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":796
 *     onan = np.nan
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         if (convert_empty and 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++) {

    /* "pandas/src/inference.pyx":797
 * 
 *     for i from 0 <= i < n:
 *         val = values[i]             # <<<<<<<<<<<<<<
 *         if (convert_empty and val == '') or (val in na_values):
 *             values[i] = onan
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/src/inference.pyx":798
 *     for i from 0 <= i < n:
 *         val = values[i]
 *         if (convert_empty and val == '') or (val in na_values):             # <<<<<<<<<<<<<<
 *             values[i] = onan
 *             na_count += 1
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_convert_empty); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_6) {
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, ((PyObject *)__pyx_kp_s_67), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_6;
    }
    if (!__pyx_t_8) {
      __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_na_values), Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_8;
    }
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":799
 *         val = values[i]
 *         if (convert_empty and val == '') or (val in na_values):
 *             values[i] = onan             # <<<<<<<<<<<<<<
 *             na_count += 1
 *         elif val in memo:
 */
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_10);
      __Pyx_INCREF(__pyx_v_onan); __Pyx_DECREF(*__pyx_t_10);
      *__pyx_t_10 = __pyx_v_onan;
      __Pyx_GIVEREF(*__pyx_t_10);

      /* "pandas/src/inference.pyx":800
 *         if (convert_empty and val == '') or (val in na_values):
 *             values[i] = onan
 *             na_count += 1             # <<<<<<<<<<<<<<
 *         elif val in memo:
 *             values[i] = memo[val]
 */
      __pyx_v_na_count = (__pyx_v_na_count + 1);
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":801
 *             values[i] = onan
 *             na_count += 1
 *         elif val in memo:             # <<<<<<<<<<<<<<
 *             values[i] = memo[val]
 *         else:
 */
    __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_memo), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":802
 *             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 = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_10);
      __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_10);
      *__pyx_t_10 = __pyx_t_3;
      __Pyx_GIVEREF(*__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":804
 *             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 = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "pandas/src/inference.pyx":806
 *             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 = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_157maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_157maybe_convert_bool = {__Pyx_NAMESTR("maybe_convert_bool"), (PyCFunction)__pyx_pw_6pandas_3lib_157maybe_convert_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_157maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_true_values = 0;
  PyObject *__pyx_v_false_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_convert_bool (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__true_values,&__pyx_n_s__false_values,0};
    PyObject* values[3] = {0,0,0};

    /* "pandas/src/inference.pyx":809
 * 
 * def maybe_convert_bool(ndarray[object] arr,
 *                        true_values=None, false_values=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__true_values);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__false_values);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_bool") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_true_values = values[1];
    __pyx_v_false_values = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maybe_convert_bool", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.maybe_convert_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_156maybe_convert_bool(__pyx_self, __pyx_v_arr, __pyx_v_true_values, __pyx_v_false_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":808
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr,             # <<<<<<<<<<<<<<
 *                        true_values=None, false_values=None):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_156maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_true_vals = 0;
  PyObject *__pyx_v_false_vals = 0;
  int __pyx_v_na_count;
  PyObject *__pyx_v_mask = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  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;
  PyArrayObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_convert_bool", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/inference.pyx":815
 *         object val
 *         set true_vals, false_vals
 *         int na_count = 0             # <<<<<<<<<<<<<<
 * 
 *     n = len(arr)
 */
  __pyx_v_na_count = 0;

  /* "pandas/src/inference.pyx":817
 *         int na_count = 0
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=np.uint8)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

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

  /* "pandas/src/inference.pyx":821
 * 
 *     # the defaults
 *     true_vals = set(('True', 'TRUE', 'true'))             # <<<<<<<<<<<<<<
 *     false_vals = set(('False', 'FALSE', 'false'))
 * 
 */
  __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  if (unlikely(PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__True)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__TRUE)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__true)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_true_vals = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/inference.pyx":822
 *     # the defaults
 *     true_vals = set(('True', 'TRUE', 'true'))
 *     false_vals = set(('False', 'FALSE', 'false'))             # <<<<<<<<<<<<<<
 * 
 *     if true_values is not None:
 */
  __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  if (unlikely(PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__False)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__FALSE)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__false)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_false_vals = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/inference.pyx":824
 *     false_vals = set(('False', 'FALSE', 'false'))
 * 
 *     if true_values is not None:             # <<<<<<<<<<<<<<
 *         true_vals = true_vals | set(true_values)
 * 
 */
  __pyx_t_12 = (__pyx_v_true_values != Py_None);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":825
 * 
 *     if true_values is not None:
 *         true_vals = true_vals | set(true_values)             # <<<<<<<<<<<<<<
 * 
 *     if false_values is not None:
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_true_values);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_true_values);
    __Pyx_GIVEREF(__pyx_v_true_values);
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Or(((PyObject *)__pyx_v_true_vals), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_true_vals));
    __pyx_v_true_vals = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":827
 *         true_vals = true_vals | set(true_values)
 * 
 *     if false_values is not None:             # <<<<<<<<<<<<<<
 *         false_vals = false_vals | set(false_values)
 * 
 */
  __pyx_t_12 = (__pyx_v_false_values != Py_None);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":828
 * 
 *     if false_values is not None:
 *         false_vals = false_vals | set(false_values)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_false_values);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_false_values);
    __Pyx_GIVEREF(__pyx_v_false_values);
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Or(((PyObject *)__pyx_v_false_vals), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_false_vals));
    __pyx_v_false_vals = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/inference.pyx":830
 *         false_vals = false_vals | set(false_values)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = arr[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":831
 * 
 *     for i from 0 <= i < n:
 *         val = arr[i]             # <<<<<<<<<<<<<<
 * 
 *         if cpython.PyBool_Check(val):
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/inference.pyx":833
 *         val = arr[i]
 * 
 *         if cpython.PyBool_Check(val):             # <<<<<<<<<<<<<<
 *             if val is True:
 *                 result[i] = 1
 */
    __pyx_t_12 = PyBool_Check(__pyx_v_val);
    if (__pyx_t_12) {

      /* "pandas/src/inference.pyx":834
 * 
 *         if cpython.PyBool_Check(val):
 *             if val is True:             # <<<<<<<<<<<<<<
 *                 result[i] = 1
 *             else:
 */
      __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = (__pyx_v_val == __pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_12) {

        /* "pandas/src/inference.pyx":835
 *         if cpython.PyBool_Check(val):
 *             if val is True:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i] = 0
 */
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_8 = -1;
        if (__pyx_t_14 < 0) {
          __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":837
 *                 result[i] = 1
 *             else:
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 *         elif val in true_vals:
 *             result[i] = 1
 */
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_8 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":838
 *             else:
 *                 result[i] = 0
 *         elif val in true_vals:             # <<<<<<<<<<<<<<
 *             result[i] = 1
 *         elif val in false_vals:
 */
    __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_true_vals), Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "pandas/src/inference.pyx":839
 *                 result[i] = 0
 *         elif val in true_vals:
 *             result[i] = 1             # <<<<<<<<<<<<<<
 *         elif val in false_vals:
 *             result[i] = 0
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":840
 *         elif val in true_vals:
 *             result[i] = 1
 *         elif val in false_vals:             # <<<<<<<<<<<<<<
 *             result[i] = 0
 *         elif PyFloat_Check(val):
 */
    __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_false_vals), Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "pandas/src/inference.pyx":841
 *             result[i] = 1
 *         elif val in false_vals:
 *             result[i] = 0             # <<<<<<<<<<<<<<
 *         elif PyFloat_Check(val):
 *             result[i] = UINT8_MAX
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":842
 *         elif val in false_vals:
 *             result[i] = 0
 *         elif PyFloat_Check(val):             # <<<<<<<<<<<<<<
 *             result[i] = UINT8_MAX
 *             na_count += 1
 */
    __pyx_t_12 = PyFloat_Check(__pyx_v_val);
    if (__pyx_t_12) {

      /* "pandas/src/inference.pyx":843
 *             result[i] = 0
 *         elif PyFloat_Check(val):
 *             result[i] = UINT8_MAX             # <<<<<<<<<<<<<<
 *             na_count += 1
 *         else:
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = UINT8_MAX;

      /* "pandas/src/inference.pyx":844
 *         elif PyFloat_Check(val):
 *             result[i] = UINT8_MAX
 *             na_count += 1             # <<<<<<<<<<<<<<
 *         else:
 *             return arr
 */
      __pyx_v_na_count = (__pyx_v_na_count + 1);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":846
 *             na_count += 1
 *         else:
 *             return arr             # <<<<<<<<<<<<<<
 * 
 *     if na_count > 0:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_arr));
      __pyx_r = ((PyObject *)__pyx_v_arr);
      goto __pyx_L0;
    }
    __pyx_L7:;
  }

  /* "pandas/src/inference.pyx":848
 *             return arr
 * 
 *     if na_count > 0:             # <<<<<<<<<<<<<<
 *         mask = result == UINT8_MAX
 *         arr = result.view(np.bool_).astype(object)
 */
  __pyx_t_12 = (__pyx_v_na_count > 0);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":849
 * 
 *     if na_count > 0:
 *         mask = result == UINT8_MAX             # <<<<<<<<<<<<<<
 *         arr = result.view(np.bool_).astype(object)
 *         np.putmask(arr, mask, np.nan)
 */
    __pyx_t_6 = PyInt_FromLong(UINT8_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_result), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_mask = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":850
 *     if na_count > 0:
 *         mask = result == UINT8_MAX
 *         arr = result.view(np.bool_).astype(object)             # <<<<<<<<<<<<<<
 *         np.putmask(arr, mask, np.nan)
 *         return arr
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __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[1]; __pyx_lineno = 850; __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[1]; __pyx_lineno = 850; __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[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __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_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__astype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_builtin_object);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_object);
    __Pyx_GIVEREF(__pyx_builtin_object);
    __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_19 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, 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_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":851
 *         mask = result == UINT8_MAX
 *         arr = result.view(np.bool_).astype(object)
 *         np.putmask(arr, mask, np.nan)             # <<<<<<<<<<<<<<
 *         return arr
 *     else:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
    __Pyx_INCREF(__pyx_v_mask);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask);
    __Pyx_GIVEREF(__pyx_v_mask);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __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_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/src/inference.pyx":852
 *         arr = result.view(np.bool_).astype(object)
 *         np.putmask(arr, mask, np.nan)
 *         return arr             # <<<<<<<<<<<<<<
 *     else:
 *         return result.view(np.bool_)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr));
    __pyx_r = ((PyObject *)__pyx_v_arr);
    goto __pyx_L0;
    goto __pyx_L9;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":854
 *         return arr
 *     else:
 *         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 = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }
  __pyx_L9:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_159map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_158map_infer_mask[] = "\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_3lib_159map_infer_mask = {__Pyx_NAMESTR("map_infer_mask"), (PyCFunction)__pyx_pw_6pandas_3lib_159map_infer_mask, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_158map_infer_mask)};
static PyObject *__pyx_pw_6pandas_3lib_159map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  PyArrayObject *__pyx_v_mask = 0;
  int __pyx_v_convert;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_infer_mask (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__mask,&__pyx_n_s__convert,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer_mask") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_f = values[1];
    __pyx_v_mask = ((PyArrayObject *)values[2]);
    if (values[3]) {
      __pyx_v_convert = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_convert == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_convert = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.map_infer_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __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[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_158map_infer_mask(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_mask, __pyx_v_convert);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":857
 * 
 * 
 * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask,             # <<<<<<<<<<<<<<
 *                    bint convert=1):
 *     '''
 */

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

  /* "pandas/src/inference.pyx":876
 *         object val
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

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

  /* "pandas/src/inference.pyx":878
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             val = util.get_value_at(arr, i)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/src/inference.pyx":879
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             val = util.get_value_at(arr, i)
 *         else:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_13 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_13) {

      /* "pandas/src/inference.pyx":880
 *     for i in range(n):
 *         if mask[i]:
 *             val = util.get_value_at(arr, i)             # <<<<<<<<<<<<<<
 *         else:
 *             val = f(util.get_value_at(arr, i))
 */
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":882
 *             val = util.get_value_at(arr, i)
 *         else:
 *             val = f(util.get_value_at(arr, i))             # <<<<<<<<<<<<<<
 * 
 *             # unbox 0-dim arrays, GH #690
 */
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/src/inference.pyx":885
 * 
 *             # unbox 0-dim arrays, GH #690
 *             if is_array(val) and PyArray_NDIM(val) == 0:             # <<<<<<<<<<<<<<
 *                 # is there a faster way to unbox?
 *                 val = val.item()
 */
      __pyx_t_5 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_14) {
        if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_5 = __pyx_v_val;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_15 = (PyArray_NDIM(((PyArrayObject *)__pyx_t_5)) == 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_14;
      }
      if (__pyx_t_16) {

        /* "pandas/src/inference.pyx":887
 *             if is_array(val) and PyArray_NDIM(val) == 0:
 *                 # is there a faster way to unbox?
 *                 val = val.item()             # <<<<<<<<<<<<<<
 * 
 *         result[i] = val
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    __pyx_L5:;

    /* "pandas/src/inference.pyx":889
 *                 val = val.item()
 * 
 *         result[i] = val             # <<<<<<<<<<<<<<
 * 
 *     if convert:
 */
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_18 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_18);
    __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_18);
    *__pyx_t_18 = __pyx_v_val;
    __Pyx_GIVEREF(*__pyx_t_18);
  }

  /* "pandas/src/inference.pyx":891
 *         result[i] = val
 * 
 *     if convert:             # <<<<<<<<<<<<<<
 *         return maybe_convert_objects(result,
 *                                      try_float=0,
 */
  if (__pyx_v_convert) {

    /* "pandas/src/inference.pyx":892
 * 
 *     if convert:
 *         return maybe_convert_objects(result,             # <<<<<<<<<<<<<<
 *                                      try_float=0,
 *                                      convert_datetime=0,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __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[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __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 = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_datetime), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_timedelta), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "pandas/src/inference.pyx":897
 *                                      convert_timedelta=0)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def map_infer(ndarray arr, object f, bint convert=1):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_161map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_160map_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_3lib_161map_infer = {__Pyx_NAMESTR("map_infer"), (PyCFunction)__pyx_pw_6pandas_3lib_161map_infer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_160map_infer)};
static PyObject *__pyx_pw_6pandas_3lib_161map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  int __pyx_v_convert;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_infer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__convert,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("map_infer", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_f = values[1];
    if (values[2]) {
      __pyx_v_convert = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_convert == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_convert = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("map_infer", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.map_infer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_160map_infer(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_convert);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":899
 *     return result
 * 
 * def map_infer(ndarray arr, object f, bint convert=1):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */

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

  /* "pandas/src/inference.pyx":917
 *         object val
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

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

  /* "pandas/src/inference.pyx":919
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = f(util.get_value_at(arr, i))
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/src/inference.pyx":920
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 *         val = f(util.get_value_at(arr, i))             # <<<<<<<<<<<<<<
 * 
 *         # unbox 0-dim arrays, GH #690
 */
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __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 = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":923
 * 
 *         # 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 = 923; __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 = 923; __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 = 923; __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) {

      /* "pandas/src/inference.pyx":925
 *         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 = 925; __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 = 925; __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_L5;
    }
    __pyx_L5:;

    /* "pandas/src/inference.pyx":927
 *             val = val.item()
 * 
 *         result[i] = val             # <<<<<<<<<<<<<<
 * 
 *     if convert:
 */
    __pyx_t_15 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_15 < 0) {
      __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_16);
    __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_16);
    *__pyx_t_16 = __pyx_v_val;
    __Pyx_GIVEREF(*__pyx_t_16);
  }

  /* "pandas/src/inference.pyx":929
 *         result[i] = val
 * 
 *     if convert:             # <<<<<<<<<<<<<<
 *         return maybe_convert_objects(result,
 *                                      try_float=0,
 */
  if (__pyx_v_convert) {

    /* "pandas/src/inference.pyx":930
 * 
 *     if convert:
 *         return maybe_convert_objects(result,             # <<<<<<<<<<<<<<
 *                                      try_float=0,
 *                                      convert_datetime=0,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __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 = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__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 = 930; __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 = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_datetime), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_timedelta), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __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_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/src/inference.pyx":935
 *                                      convert_timedelta=0)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_163to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_163to_object_array = {__Pyx_NAMESTR("to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_163to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_163to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_object_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_162to_object_array(__pyx_self, ((PyObject*)__pyx_v_rows));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":938
 * 
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

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

  /* "pandas/src/inference.pyx":944
 *         list row
 * 
 *     n = len(rows)             # <<<<<<<<<<<<<<
 * 
 *     k = 0
 */
  if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_rows)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":946
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "pandas/src/inference.pyx":947
 * 
 *     k = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         tmp = len(rows[i])
 *         if tmp > k:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":948
 *     k = 0
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])             # <<<<<<<<<<<<<<
 *         if tmp > k:
 *             k = tmp
 */
    if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp = __pyx_t_3;

    /* "pandas/src/inference.pyx":949
 *     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) {

      /* "pandas/src/inference.pyx":950
 *         tmp = len(rows[i])
 *         if tmp > k:
 *             k = tmp             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype=object)
 */
      __pyx_v_k = __pyx_v_tmp;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/src/inference.pyx":952
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __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 = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __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 = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":954
 *     result = np.empty((n, k), dtype=object)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         row = rows[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":955
 * 
 *     for i from 0 <= i < n:
 *         row = rows[i]             # <<<<<<<<<<<<<<
 * 
 *         for j from 0 <= j < len(row):
 */
    if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_row));
    __pyx_v_row = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":957
 *         row = rows[i]
 * 
 *         for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *             result[i, j] = row[j]
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {

      /* "pandas/src/inference.pyx":958
 * 
 *         for j from 0 <= j < len(row):
 *             result[i, j] = row[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_9 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_result.diminfo[1].strides);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15);
      *__pyx_t_15 = __pyx_t_2;
      __Pyx_GIVEREF(*__pyx_t_15);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "pandas/src/inference.pyx":960
 *             result[i, j] = row[j]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def tuples_to_object_array(ndarray[object] tuples):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_165tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_165tuples_to_object_array = {__Pyx_NAMESTR("tuples_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_165tuples_to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_165tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tuples_to_object_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tuples), __pyx_ptype_5numpy_ndarray, 1, "tuples", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_164tuples_to_object_array(__pyx_self, ((PyArrayObject *)__pyx_v_tuples));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":962
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

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

  /* "pandas/src/inference.pyx":968
 *         tuple tup
 * 
 *     n = len(tuples)             # <<<<<<<<<<<<<<
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_tuples)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":969
 * 
 *     n = len(tuples)
 *     k = len(tuples[0])             # <<<<<<<<<<<<<<
 *     result = np.empty((n, k), dtype=object)
 *     for i in range(n):
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_pybuffernd_tuples.diminfo[0].shape;
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_tuples.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_2);
  __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

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

  /* "pandas/src/inference.pyx":971
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         tup = tuples[i]
 *         for j in range(k):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/src/inference.pyx":972
 *     result = np.empty((n, k), dtype=object)
 *     for i in range(n):
 *         tup = tuples[i]             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             result[i, j] = tup[j]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_tuples.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_tuples.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_tup));
    __pyx_v_tup = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":973
 *     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;

      /* "pandas/src/inference.pyx":974
 *         tup = tuples[i]
 *         for j in range(k):
 *             result[i, j] = tup[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      if (unlikely(((PyObject *)__pyx_v_tup) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_tup), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_17 = __pyx_v_j;
      __pyx_t_4 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 1;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_4 = 1;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_result.diminfo[1].strides);
      __Pyx_GOTREF(*__pyx_t_18);
      __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_18);
      *__pyx_t_18 = __pyx_t_2;
      __Pyx_GIVEREF(*__pyx_t_18);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "pandas/src/inference.pyx":976
 *             result[i, j] = tup[j]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def to_object_array_tuples(list rows):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_167to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_167to_object_array_tuples = {__Pyx_NAMESTR("to_object_array_tuples"), (PyCFunction)__pyx_pw_6pandas_3lib_167to_object_array_tuples, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_167to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_object_array_tuples (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_166to_object_array_tuples(__pyx_self, ((PyObject*)__pyx_v_rows));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":978
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

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

  /* "pandas/src/inference.pyx":984
 *         tuple row
 * 
 *     n = len(rows)             # <<<<<<<<<<<<<<
 * 
 *     k = 0
 */
  if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_rows)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":986
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "pandas/src/inference.pyx":987
 * 
 *     k = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         tmp = len(rows[i])
 *         if tmp > k:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/inference.pyx":988
 *     k = 0
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])             # <<<<<<<<<<<<<<
 *         if tmp > k:
 *             k = tmp
 */
    if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp = __pyx_t_3;

    /* "pandas/src/inference.pyx":989
 *     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) {

      /* "pandas/src/inference.pyx":990
 *         tmp = len(rows[i])
 *         if tmp > k:
 *             k = tmp             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype=object)
 */
      __pyx_v_k = __pyx_v_tmp;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/src/inference.pyx":992
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":994
 *     result = np.empty((n, k), dtype=object)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             row = rows[i]
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "pandas/src/inference.pyx":995
 * 
 *     try:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             row = rows[i]
 *             for j from 0 <= j < len(row):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
        __pyx_v_i = __pyx_t_3;

        /* "pandas/src/inference.pyx":996
 *     try:
 *         for i in range(n):
 *             row = rows[i]             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]
 */
        if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        }
        __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pandas/src/inference.pyx":997
 *         for i in range(n):
 *             row = rows[i]
 *             for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[j]
 *     except Exception:
 */
        if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        }
        __pyx_t_13 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) {

          /* "pandas/src/inference.pyx":998
 *             row = rows[i]
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]             # <<<<<<<<<<<<<<
 *     except Exception:
 *         # upcast any subclasses to tuple
 */
          if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          }
          __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = __pyx_v_i;
          __pyx_t_15 = __pyx_v_j;
          __pyx_t_9 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_pybuffernd_result.diminfo[1].shape;
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1;
          if (unlikely(__pyx_t_9 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_9);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          }
          __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_result.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_16);
          *__pyx_t_16 = __pyx_t_2;
          __Pyx_GIVEREF(*__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
    }
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L13_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":999
 *             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.lib.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);

      /* "pandas/src/inference.pyx":1001
 *     except Exception:
 *         # upcast any subclasses to tuple
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             row = tuple(rows[i])
 *             for j from 0 <= j < len(row):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
        __pyx_v_i = __pyx_t_3;

        /* "pandas/src/inference.pyx":1002
 *         # 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]
 */
        if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        }
        __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 = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
        __Pyx_XDECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pandas/src/inference.pyx":1003
 *         for i in range(n):
 *             row = tuple(rows[i])
 *             for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[j]
 * 
 */
        __pyx_t_13 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) {

          /* "pandas/src/inference.pyx":1004
 *             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 = 1004; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_9 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
          if (__pyx_t_19 < 0) {
            __pyx_t_19 += __pyx_pybuffernd_result.diminfo[1].shape;
            if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1;
          } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1;
          if (unlikely(__pyx_t_9 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_9);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          }
          __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_result.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_16);
          *__pyx_t_16 = __pyx_t_5;
          __Pyx_GIVEREF(*__pyx_t_16);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_exception_handled;
    }
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
    __pyx_L13_try_end:;
  }

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

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_169fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_169fast_multiget = {__Pyx_NAMESTR("fast_multiget"), (PyCFunction)__pyx_pw_6pandas_3lib_169fast_multiget, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_169fast_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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_multiget (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mapping,&__pyx_n_s__keys,&__pyx_n_s__default,0};
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_81;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapping)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_multiget") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_mapping = ((PyObject*)values[0]);
    __pyx_v_keys = ((PyArrayObject *)values[1]);
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __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 = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_168fast_multiget(__pyx_self, __pyx_v_mapping, __pyx_v_keys, __pyx_v_default);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":1009
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */

static PyObject *__pyx_pf_6pandas_3lib_168fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject **__pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_multiget", 0);
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;

  /* "pandas/src/inference.pyx":1011
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):
 *     cdef:
 *         Py_ssize_t i, n = len(keys)             # <<<<<<<<<<<<<<
 *         object val
 *         ndarray[object] output = np.empty(n, dtype='O')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":1013
 *         Py_ssize_t i, n = len(keys)
 *         object val
 *         ndarray[object] output = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __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 = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __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 = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":1015
 *         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) {

    /* "pandas/src/inference.pyx":1017
 *     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 = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __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 = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_82), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":1019
 *         return np.empty(0, dtype='f8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pandas/src/inference.pyx":1020
 * 
 *     for i in range(n):
 *         val = util.get_value_1d(keys, i)             # <<<<<<<<<<<<<<
 *         if val in mapping:
 *             output[i] = mapping[val]
 */
    __pyx_t_4 = get_value_1d(__pyx_v_keys, __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/src/inference.pyx":1021
 *     for i in range(n):
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:             # <<<<<<<<<<<<<<
 *             output[i] = mapping[val]
 *         else:
 */
    if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_mapping), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":1022
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:
 *             output[i] = mapping[val]             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = default
 */
      if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_v_val); if (!__pyx_t_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_output.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_11);
      __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_11);
      *__pyx_t_11 = __pyx_t_4;
      __Pyx_GIVEREF(*__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":1024
 *             output[i] = mapping[val]
 *         else:
 *             output[i] = default             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(output)
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_output.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_11);
      __Pyx_INCREF(__pyx_v_default); __Pyx_DECREF(*__pyx_t_11);
      *__pyx_t_11 = __pyx_v_default;
      __Pyx_GIVEREF(*__pyx_t_11);
    }
    __pyx_L6:;
  }

  /* "pandas/src/inference.pyx":1026
 *             output[i] = default
 * 
 *     return maybe_convert_objects(output)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_output));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* "datetime.pxd":126
 * 
 * 
 * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts):             # <<<<<<<<<<<<<<
 *     cdef int result
 *     cdef char *tmp
 */

static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  int __pyx_v_result;
  char *__pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_string_to_dts", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "datetime.pxd":130
 *     cdef char *tmp
 * 
 *     if PyUnicode_Check(val):             # <<<<<<<<<<<<<<
 *         val = PyUnicode_AsASCIIString(val);
 * 
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_val);
  if (__pyx_t_1) {

    /* "datetime.pxd":131
 * 
 *     if PyUnicode_Check(val):
 *         val = PyUnicode_AsASCIIString(val);             # <<<<<<<<<<<<<<
 * 
 *     tmp = val
 */
    __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; __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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "datetime.pxd":133
 *         val = PyUnicode_AsASCIIString(val);
 * 
 *     tmp = val             # <<<<<<<<<<<<<<
 *     result = _cstring_to_dts(tmp, len(val), dts)
 * 
 */
  __pyx_t_3 = PyBytes_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_tmp = __pyx_t_3;

  /* "datetime.pxd":134
 * 
 *     tmp = val
 *     result = _cstring_to_dts(tmp, len(val), dts)             # <<<<<<<<<<<<<<
 * 
 *     if result == -1:
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts);

  /* "datetime.pxd":136
 *     result = _cstring_to_dts(tmp, len(val), dts)
 * 
 *     if result == -1:             # <<<<<<<<<<<<<<
 *         raise ValueError('Unable to parse %s' % str(val))
 * 
 */
  __pyx_t_1 = (__pyx_v_result == -1);
  if (__pyx_t_1) {

    /* "datetime.pxd":137
 * 
 *     if result == -1:
 *         raise ValueError('Unable to parse %s' % str(val))             # <<<<<<<<<<<<<<
 * 
 * cdef inline int _cstring_to_dts(char *val, int length,
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_83), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 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_5), NULL); if (unlikely(!__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(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":139
 *         raise ValueError('Unable to parse %s' % str(val))
 * 
 * cdef inline int _cstring_to_dts(char *val, int length,             # <<<<<<<<<<<<<<
 *                                 pandas_datetimestruct* dts):
 *     cdef:
 */

static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) {
  npy_bool __pyx_v_islocal;
  npy_bool __pyx_v_special;
  PANDAS_DATETIMEUNIT __pyx_v_out_bestunit;
  int __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cstring_to_dts", 0);

  /* "datetime.pxd":148
 *     result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns,
 *                                      NPY_UNSAFE_CASTING,
 *                                      dts, &islocal, &out_bestunit, &special)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special));

  /* "datetime.pxd":149
 *                                      NPY_UNSAFE_CASTING,
 *                                      dts, &islocal, &out_bestunit, &special)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

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

/* "datetime.pxd":152
 * 
 * 
 * cdef inline object _datetime64_to_datetime(int64_t val):             # <<<<<<<<<<<<<<
 *     cdef pandas_datetimestruct dts
 *     pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 */

static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) {
  pandas_datetimestruct __pyx_v_dts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0);

  /* "datetime.pxd":154
 * cdef inline object _datetime64_to_datetime(int64_t val):
 *     cdef pandas_datetimestruct dts
 *     pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *     return _dts_to_pydatetime(&dts)
 * 
 */
  pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts));

  /* "datetime.pxd":155
 *     cdef pandas_datetimestruct dts
 *     pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *     return _dts_to_pydatetime(&dts)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 155; __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("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":157
 *     return _dts_to_pydatetime(&dts)
 * 
 * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     return <object> PyDateTime_FromDateAndTime(dts.year, dts.month,
 *                                                dts.day, dts.hour,
 */

static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0);

  /* "datetime.pxd":158
 * 
 * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts):
 *     return <object> PyDateTime_FromDateAndTime(dts.year, dts.month,             # <<<<<<<<<<<<<<
 *                                                dts.day, dts.hour,
 *                                                dts.min, dts.sec, dts.us)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "datetime.pxd":160
 *     return <object> PyDateTime_FromDateAndTime(dts.year, dts.month,
 *                                                dts.day, dts.hour,
 *                                                dts.min, dts.sec, dts.us)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):
 */
  __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = __pyx_t_1;
  __Pyx_DECREF(__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("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":162
 *                                                dts.min, dts.sec, dts.us)
 * 
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0);

  /* "datetime.pxd":163
 * 
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)             # <<<<<<<<<<<<<<
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":164
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)             # <<<<<<<<<<<<<<
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":165
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)             # <<<<<<<<<<<<<<
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":166
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)             # <<<<<<<<<<<<<<
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 */
  __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val);

  /* "datetime.pxd":167
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)             # <<<<<<<<<<<<<<
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 */
  __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val);

  /* "datetime.pxd":168
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)             # <<<<<<<<<<<<<<
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 *     dts.ps = dts.as = 0
 */
  __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val);

  /* "datetime.pxd":169
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)             # <<<<<<<<<<<<<<
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val);

  /* "datetime.pxd":170
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 *     dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;
  __pyx_v_dts->as = 0;

  /* "datetime.pxd":171
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _dtlike_to_datetime64(object val,
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":173
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 * cdef inline int64_t _dtlike_to_datetime64(object val,             # <<<<<<<<<<<<<<
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  npy_int64 __pyx_t_2;
  npy_int32 __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0);

  /* "datetime.pxd":175
 * cdef inline int64_t _dtlike_to_datetime64(object val,
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year             # <<<<<<<<<<<<<<
 *     dts.month = val.month
 *     dts.day = val.day
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->year = __pyx_t_2;

  /* "datetime.pxd":176
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year
 *     dts.month = val.month             # <<<<<<<<<<<<<<
 *     dts.day = val.day
 *     dts.hour = val.hour
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->month = __pyx_t_3;

  /* "datetime.pxd":177
 *     dts.year = val.year
 *     dts.month = val.month
 *     dts.day = val.day             # <<<<<<<<<<<<<<
 *     dts.hour = val.hour
 *     dts.min = val.minute
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->day = __pyx_t_3;

  /* "datetime.pxd":178
 *     dts.month = val.month
 *     dts.day = val.day
 *     dts.hour = val.hour             # <<<<<<<<<<<<<<
 *     dts.min = val.minute
 *     dts.sec = val.second
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->hour = __pyx_t_3;

  /* "datetime.pxd":179
 *     dts.day = val.day
 *     dts.hour = val.hour
 *     dts.min = val.minute             # <<<<<<<<<<<<<<
 *     dts.sec = val.second
 *     dts.us = val.microsecond
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->min = __pyx_t_3;

  /* "datetime.pxd":180
 *     dts.hour = val.hour
 *     dts.min = val.minute
 *     dts.sec = val.second             # <<<<<<<<<<<<<<
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->sec = __pyx_t_3;

  /* "datetime.pxd":181
 *     dts.min = val.minute
 *     dts.sec = val.second
 *     dts.us = val.microsecond             # <<<<<<<<<<<<<<
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->us = __pyx_t_3;

  /* "datetime.pxd":182
 *     dts.sec = val.second
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;
  __pyx_v_dts->as = 0;

  /* "datetime.pxd":183
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _date_to_datetime64(object val,
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":185
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 * cdef inline int64_t _date_to_datetime64(object val,             # <<<<<<<<<<<<<<
 *                                         pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_date_to_datetime64", 0);

  /* "datetime.pxd":187
 * cdef inline int64_t _date_to_datetime64(object val,
 *                                         pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)             # <<<<<<<<<<<<<<
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":188
 *                                         pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)             # <<<<<<<<<<<<<<
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":189
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)             # <<<<<<<<<<<<<<
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 *     dts.ps = dts.as = 0
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":190
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = dts.min = dts.sec = dts.us = 0             # <<<<<<<<<<<<<<
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_v_dts->hour = 0;
  __pyx_v_dts->min = 0;
  __pyx_v_dts->sec = 0;
  __pyx_v_dts->us = 0;

  /* "datetime.pxd":191
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 *     dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;
  __pyx_v_dts->as = 0;

  /* "datetime.pxd":192
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":196
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }

  /* "numpy.pxd":202
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __pyx_t_1 = (__pyx_v_info == NULL);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":205
 * 
 *             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":206
 *             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":208
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "numpy.pxd":210
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":211
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "numpy.pxd":213
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "numpy.pxd":215
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
  if (__pyx_t_1) {

    /* "numpy.pxd":216
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
    __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS));
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "numpy.pxd":217
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "numpy.pxd":219
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
  if (__pyx_t_3) {

    /* "numpy.pxd":220
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
    __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS));
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "numpy.pxd":221
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "numpy.pxd":223
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "numpy.pxd":224
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "numpy.pxd":225
 *             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":228
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "numpy.pxd":229
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "numpy.pxd":230
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_5 = __pyx_v_ndim;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "numpy.pxd":231
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "numpy.pxd":232
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "numpy.pxd":234
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "numpy.pxd":235
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L7:;

  /* "numpy.pxd":236
 *                 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":237
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "numpy.pxd":238
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self));

  /* "numpy.pxd":241
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef list stack
 */
  __pyx_v_f = NULL;

  /* "numpy.pxd":242
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef list stack
 *             cdef int offset
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->descr);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "numpy.pxd":246
 *             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":248
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_2 = (!__pyx_v_hasfields);
  if (__pyx_t_2) {
    __pyx_t_3 = (!__pyx_v_copy_shape);
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "numpy.pxd":250
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "numpy.pxd":253
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L10:;

  /* "numpy.pxd":255
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 */
  __pyx_t_1 = (!__pyx_v_hasfields);
  if (__pyx_t_1) {

    /* "numpy.pxd":256
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 */
    __pyx_t_5 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_5;

    /* "numpy.pxd":257
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_little_endian;
    } else {
      __pyx_t_2 = __pyx_t_1;
    }
    if (!__pyx_t_2) {

      /* "numpy.pxd":258
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
      if (__pyx_t_1) {
        __pyx_t_3 = (!__pyx_v_little_endian);
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_1;
      }
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    if (__pyx_t_1) {

      /* "numpy.pxd":259
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "numpy.pxd":260
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__b;
      goto __pyx_L13;
    }

    /* "numpy.pxd":261
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__B;
      goto __pyx_L13;
    }

    /* "numpy.pxd":262
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__h;
      goto __pyx_L13;
    }

    /* "numpy.pxd":263
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__H;
      goto __pyx_L13;
    }

    /* "numpy.pxd":264
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_INT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__i;
      goto __pyx_L13;
    }

    /* "numpy.pxd":265
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__I;
      goto __pyx_L13;
    }

    /* "numpy.pxd":266
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__l;
      goto __pyx_L13;
    }

    /* "numpy.pxd":267
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__L;
      goto __pyx_L13;
    }

    /* "numpy.pxd":268
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":269
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":270
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__f;
      goto __pyx_L13;
    }

    /* "numpy.pxd":271
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__d;
      goto __pyx_L13;
    }

    /* "numpy.pxd":272
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__g;
      goto __pyx_L13;
    }

    /* "numpy.pxd":273
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zf;
      goto __pyx_L13;
    }

    /* "numpy.pxd":274
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zd;
      goto __pyx_L13;
    }

    /* "numpy.pxd":275
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zg;
      goto __pyx_L13;
    }

    /* "numpy.pxd":276
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__O;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "numpy.pxd":278
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_90), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L13:;

    /* "numpy.pxd":279
 *                 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":280
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "numpy.pxd":282
 *                 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":283
 *             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":284
 *                 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":287
 *                 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[5]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_9;

    /* "numpy.pxd":288
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = 0;
  }
  __pyx_L11:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":290
 *                 f[0] = 0 # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "numpy.pxd":291
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self);
  if (__pyx_t_1) {

    /* "numpy.pxd":292
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)
 */
    free(__pyx_v_info->format);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":293
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":294
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    free(__pyx_v_info->strides);
    goto __pyx_L4;
  }
  __pyx_L4:;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":772
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "numpy.pxd":773
 * 
 * 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[5]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":775
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "numpy.pxd":776
 * 
 * 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[5]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":778
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "numpy.pxd":779
 * 
 * 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[5]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":781
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "numpy.pxd":782
 * 
 * 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[5]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":784
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "numpy.pxd":785
 * 
 * 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[5]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":787
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);

  /* "numpy.pxd":794
 *     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":795
 *     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":798
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_childname);
    __pyx_v_childname = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "numpy.pxd":799
 * 
 *     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[5]; __pyx_lineno = 799; __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[5]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_fields));
    __pyx_v_fields = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "numpy.pxd":800
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 */
    if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) {
      PyObject* sequence = ((PyObject *)__pyx_v_fields);
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_new_offset);
    __pyx_v_new_offset = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "numpy.pxd":802
 *         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[5]; __pyx_lineno = 802; __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[5]; __pyx_lineno = 802; __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[5]; __pyx_lineno = 802; __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[5]; __pyx_lineno = 802; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {

      /* "numpy.pxd":803
 * 
 *         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_92), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "numpy.pxd":805
 *             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_7 = (__pyx_v_child->byteorder == '>');
    if (__pyx_t_7) {
      __pyx_t_8 = __pyx_v_little_endian;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    if (!__pyx_t_8) {

      /* "numpy.pxd":806
 * 
 *         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_7 = (__pyx_v_child->byteorder == '<');
      if (__pyx_t_7) {
        __pyx_t_9 = (!__pyx_v_little_endian);
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_7;
      }
      __pyx_t_7 = __pyx_t_10;
    } else {
      __pyx_t_7 = __pyx_t_8;
    }
    if (__pyx_t_7) {

      /* "numpy.pxd":807
 *         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_93), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "numpy.pxd":817
 * 
 *         # 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[5]; __pyx_lineno = 817; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_7) break;

      /* "numpy.pxd":818
 *         # 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":819
 *         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":820
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_11 = 0;
      (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1);
    }

    /* "numpy.pxd":822
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_11 = 0;
    (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize);

    /* "numpy.pxd":824
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child));
    if (__pyx_t_7) {

      /* "numpy.pxd":825
 * 
 *         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[5]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "numpy.pxd":826
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5);
      if (__pyx_t_7) {

        /* "numpy.pxd":827
 *             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_95), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "numpy.pxd":830
 * 
 *             # 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[5]; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L13;
      }

      /* "numpy.pxd":831
 *             # 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[5]; __pyx_lineno = 831; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L13;
      }

      /* "numpy.pxd":832
 *             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[5]; __pyx_lineno = 832; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 104;
        goto __pyx_L13;
      }

      /* "numpy.pxd":833
 *             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[5]; __pyx_lineno = 833; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L13;
      }

      /* "numpy.pxd":834
 *             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[5]; __pyx_lineno = 834; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 105;
        goto __pyx_L13;
      }

      /* "numpy.pxd":835
 *             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[5]; __pyx_lineno = 835; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L13;
      }

      /* "numpy.pxd":836
 *             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[5]; __pyx_lineno = 836; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 108;
        goto __pyx_L13;
      }

      /* "numpy.pxd":837
 *             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[5]; __pyx_lineno = 837; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L13;
      }

      /* "numpy.pxd":838
 *             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[5]; __pyx_lineno = 838; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 113;
        goto __pyx_L13;
      }

      /* "numpy.pxd":839
 *             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[5]; __pyx_lineno = 839; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L13;
      }

      /* "numpy.pxd":840
 *             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[5]; __pyx_lineno = 840; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 102;
        goto __pyx_L13;
      }

      /* "numpy.pxd":841
 *             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[5]; __pyx_lineno = 841; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 100;
        goto __pyx_L13;
      }

      /* "numpy.pxd":842
 *             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[5]; __pyx_lineno = 842; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 103;
        goto __pyx_L13;
      }

      /* "numpy.pxd":843
 *             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[5]; __pyx_lineno = 843; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 102;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":844
 *             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[5]; __pyx_lineno = 844; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 100;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":845
 *             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[5]; __pyx_lineno = 845; __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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 103;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":846
 *             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[5]; __pyx_lineno = 846; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "numpy.pxd":848
 *             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_90), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __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[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L13:;

      /* "numpy.pxd":849
 *             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_L11;
    }
    /*else*/ {

      /* "numpy.pxd":853
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
      __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_12;
    }
    __pyx_L11:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":854
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":969
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "numpy.pxd":971
 * 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":972
 *      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":974
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
    Py_INCREF(__pyx_v_base);

    /* "numpy.pxd":975
 *      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":976
 *          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":977
 *          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":979
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "numpy.pxd":980
 * 
 * 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":981
 * 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":983
 *         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":26
 *     object sarr_from_data(cnp.dtype, int length, void* data)
 * 
 * cdef inline object get_value_at(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_at", 0);
  __Pyx_INCREF(__pyx_v_loc);

  /* "util.pxd":30
 *         Py_ssize_t i, sz
 *         void* data_ptr
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "util.pxd":31
 *         void* data_ptr
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "util.pxd":32
 *     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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "util.pxd":33
 *         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":34
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_5);

  /* "util.pxd":35
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0 and sz > 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "util.pxd":37
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0 and sz > 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz or sz == 0:
 */
  __pyx_t_4 = (__pyx_v_i < 0);
  if (__pyx_t_4) {
    __pyx_t_6 = (__pyx_v_sz > 0);
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_4;
  }
  if (__pyx_t_7) {

    /* "util.pxd":38
 * 
 *     if i < 0 and sz > 0:
 *         i += sz             # <<<<<<<<<<<<<<
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')
 */
    __pyx_v_i = (__pyx_v_i + __pyx_v_sz);
    goto __pyx_L5;
  }

  /* "util.pxd":39
 *     if i < 0 and sz > 0:
 *         i += sz
 *     elif i >= sz or sz == 0:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_7 = (__pyx_v_i >= __pyx_v_sz);
  if (!__pyx_t_7) {
    __pyx_t_4 = (__pyx_v_sz == 0);
    __pyx_t_6 = __pyx_t_4;
  } else {
    __pyx_t_6 = __pyx_t_7;
  }
  if (__pyx_t_6) {

    /* "util.pxd":40
 *         i += sz
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "util.pxd":42
 *         raise IndexError('index out of bounds')
 * 
 *     return get_value_1d(arr, i)             # <<<<<<<<<<<<<<
 * 
 * cdef inline set_value_at(ndarray arr, object loc, object value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":44
 *     return get_value_1d(arr, i)
 * 
 * cdef inline set_value_at(ndarray arr, object loc, object value):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_value_at", 0);
  __Pyx_INCREF(__pyx_v_loc);

  /* "util.pxd":47
 *     cdef:
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "util.pxd":48
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "util.pxd":49
 *     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); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "util.pxd":50
 *         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":51
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_5);

  /* "util.pxd":52
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "util.pxd":54
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz:
 */
  __pyx_t_4 = (__pyx_v_i < 0);
  if (__pyx_t_4) {

    /* "util.pxd":55
 * 
 *     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":56
 *     if i < 0:
 *         i += sz
 *     elif i >= sz:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_4 = (__pyx_v_i >= __pyx_v_sz);
  if (__pyx_t_4) {

    /* "util.pxd":57
 *         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_98), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "util.pxd":59
 *         raise IndexError('index out of bounds')
 * 
 *     assign_value_1d(arr, i, value)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int is_contiguous(ndarray arr):
 */
  __pyx_t_1 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":61
 *     assign_value_1d(arr, i, value)
 * 
 * cdef inline int is_contiguous(ndarray arr):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 */

static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_contiguous", 0);

  /* "util.pxd":62
 * 
 * cdef inline int is_contiguous(ndarray arr):
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 * 
 * cdef inline is_array(object o):
 */
  __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS);
  goto __pyx_L0;

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

/* "util.pxd":64
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 * cdef inline is_array(object o):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_Check(o)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array", 0);

  /* "util.pxd":65
 * 
 * cdef inline is_array(object o):
 *     return cnp.PyArray_Check(o)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "util.pxd":68
 * 
 * 
 * cdef inline bint _checknull(object val):             # <<<<<<<<<<<<<<
 *     try:
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 */

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

  /* "util.pxd":69
 * 
 * cdef inline bint _checknull(object val):
 *     try:             # <<<<<<<<<<<<<<
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 *     except ValueError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "util.pxd":70
 * cdef inline bint _checknull(object val):
 *     try:
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return False
 */
      __pyx_t_4 = (__pyx_v_val == Py_None);
      __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      if (!__pyx_t_4) {
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        if (__pyx_t_4) {
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_8 = __pyx_t_7;
          __pyx_t_7 = 0;
        } else {
          __pyx_t_8 = __pyx_t_6;
          __pyx_t_6 = 0;
        }
        __pyx_t_6 = __pyx_t_8;
        __pyx_t_8 = 0;
      } else {
        __pyx_t_6 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "util.pxd":71
 *     try:
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);

      /* "util.pxd":72
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 *     except ValueError:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _checknull_old(object val):
 */
      __pyx_r = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":74
 *         return False
 * 
 * cdef inline bint _checknull_old(object val):             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     cdef double INF = <double> np.inf
 */

static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) {
  PyObject *__pyx_v_np = NULL;
  double __pyx_v_INF;
  double __pyx_v_NEGINF;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __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;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_checknull_old", 0);

  /* "util.pxd":75
 * 
 * cdef inline bint _checknull_old(object val):
 *     import numpy as np             # <<<<<<<<<<<<<<
 *     cdef double INF = <double> np.inf
 *     cdef double NEGINF = -INF
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "util.pxd":76
 * cdef inline bint _checknull_old(object val):
 *     import numpy as np
 *     cdef double INF = <double> np.inf             # <<<<<<<<<<<<<<
 *     cdef double NEGINF = -INF
 *     try:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_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[6]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_INF = ((double)__pyx_t_2);

  /* "util.pxd":77
 *     import numpy as np
 *     cdef double INF = <double> np.inf
 *     cdef double NEGINF = -INF             # <<<<<<<<<<<<<<
 *     try:
 *         return bool(val is None or val != val and val != INF
 */
  __pyx_v_NEGINF = (-__pyx_v_INF);

  /* "util.pxd":78
 *     cdef double INF = <double> np.inf
 *     cdef double NEGINF = -INF
 *     try:             # <<<<<<<<<<<<<<
 *         return bool(val is None or val != val and val != INF
 *                     and val != NEGINF)
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "util.pxd":79
 *     cdef double NEGINF = -INF
 *     try:
 *         return bool(val is None or val != val and val != INF             # <<<<<<<<<<<<<<
 *                     and val != NEGINF)
 *     except ValueError:
 */
      __pyx_t_6 = (__pyx_v_val == Py_None);
      if (!__pyx_t_6) {
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_7) {

          /* "util.pxd":80
 *     try:
 *         return bool(val is None or val != val and val != INF
 *                     and val != NEGINF)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return False
 */
          __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_9) {
            __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_11 = __pyx_t_10;
          } else {
            __pyx_t_11 = __pyx_t_9;
          }
          __pyx_t_9 = __pyx_t_11;
        } else {
          __pyx_t_9 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_9;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_r = (!(!__pyx_t_7));
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "util.pxd":81
 *         return bool(val is None or val != val and val != INF
 *                     and val != NEGINF)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_13);

      /* "util.pxd":82
 *                     and val != NEGINF)
 *     except ValueError:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _checknan(object val):
 */
      __pyx_r = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L10_try_end:;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":84
 *         return False
 * 
 * cdef inline bint _checknan(object val):             # <<<<<<<<<<<<<<
 *     return not cnp.PyArray_Check(val) and val != val
 */

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

  /* "util.pxd":85
 * 
 * cdef inline bint _checknan(object val):
 *     return not cnp.PyArray_Check(val) and val != val             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((!PyArray_Check(__pyx_v_val))); 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_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

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

static PyObject *__pyx_tp_new_6pandas_3lib__PandasNull(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib__PandasNull(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_6pandas_3lib__PandasNull[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__PandasNull = {
  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__PandasNull = {
  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__PandasNull = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__PandasNull = {
  #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_3lib__PandasNull = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib._PandasNull"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib__PandasNull), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib__PandasNull, /*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__PandasNull, /*tp_as_number*/
  &__pyx_tp_as_sequence__PandasNull, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__PandasNull, /*tp_as_mapping*/
  __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__PandasNull, /*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*/
  __pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib__PandasNull, /*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_3lib__PandasNull, /*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_3lib_Reducer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_Reducer *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_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);
  p->labels = Py_None; Py_INCREF(Py_None);
  p->typ = Py_None; Py_INCREF(Py_None);
  p->index = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_Reducer(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o;
  Py_CLEAR(p->arr);
  Py_CLEAR(p->dummy);
  Py_CLEAR(p->f);
  Py_CLEAR(p->labels);
  Py_CLEAR(p->typ);
  Py_CLEAR(p->index);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_Reducer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_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;
  }
  if (p->labels) {
    e = (*v)(p->labels, a); if (e) return e;
  }
  if (p->typ) {
    e = (*v)(p->typ, a); if (e) return e;
  }
  if (p->index) {
    e = (*v)(p->index, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_3lib_Reducer(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_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);
  tmp = ((PyObject*)p->labels);
  p->labels = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->typ);
  p->typ = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->index);
  p->index = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_3lib_Reducer[] = {
  {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Reducer = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Reducer = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Reducer = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Reducer = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_3lib_Reducer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.Reducer"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_Reducer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_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_3lib_Reducer, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_Reducer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_Reducer, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_7Reducer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_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_3lib_SeriesBinGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o);
  p->arr = Py_None; Py_INCREF(Py_None);
  p->index = Py_None; Py_INCREF(Py_None);
  p->dummy_arr = Py_None; Py_INCREF(Py_None);
  p->dummy_index = Py_None; Py_INCREF(Py_None);
  p->values = Py_None; Py_INCREF(Py_None);
  p->f = Py_None; Py_INCREF(Py_None);
  p->bins = Py_None; Py_INCREF(Py_None);
  p->typ = Py_None; Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_SeriesBinGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o;
  Py_CLEAR(p->arr);
  Py_CLEAR(p->index);
  Py_CLEAR(p->dummy_arr);
  Py_CLEAR(p->dummy_index);
  Py_CLEAR(p->values);
  Py_CLEAR(p->f);
  Py_CLEAR(p->bins);
  Py_CLEAR(p->typ);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_SeriesBinGrouper(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)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_arr) {
    e = (*v)(p->dummy_arr, a); if (e) return e;
  }
  if (p->dummy_index) {
    e = (*v)(p->dummy_index, a); if (e) return e;
  }
  if (p->values) {
    e = (*v)(p->values, a); if (e) return e;
  }
  if (p->f) {
    e = (*v)(p->f, a); if (e) return e;
  }
  if (p->bins) {
    e = (*v)(p->bins, a); if (e) return e;
  }
  if (p->typ) {
    e = (*v)(p->typ, 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_3lib_SeriesBinGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)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_arr);
  p->dummy_arr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dummy_index);
  p->dummy_index = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->values);
  p->values = 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->bins);
  p->bins = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->typ);
  p->typ = 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_getprop_6pandas_3lib_16SeriesBinGrouper_arr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_values(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_f(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_bins(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_bins(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_typ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_typ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pandas_3lib_SeriesBinGrouper[] = {
  {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_3lib_SeriesBinGrouper[] = {
  {(char *)"arr", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_arr, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_arr, 0, 0},
  {(char *)"index", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_index, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_index, 0, 0},
  {(char *)"dummy_arr", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr, 0, 0},
  {(char *)"dummy_index", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_index, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_index, 0, 0},
  {(char *)"values", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_values, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_values, 0, 0},
  {(char *)"f", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_f, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_f, 0, 0},
  {(char *)"bins", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_bins, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_bins, 0, 0},
  {(char *)"typ", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_typ, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_typ, 0, 0},
  {(char *)"name", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_name, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_name, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_SeriesBinGrouper = {
  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_SeriesBinGrouper = {
  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_SeriesBinGrouper = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_SeriesBinGrouper = {
  #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_3lib_SeriesBinGrouper = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.SeriesBinGrouper"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_SeriesBinGrouper, /*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_SeriesBinGrouper, /*tp_as_number*/
  &__pyx_tp_as_sequence_SeriesBinGrouper, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_SeriesBinGrouper, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_SeriesBinGrouper, /*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 grouping operation according to bin edges, rather than labels\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_3lib_SeriesBinGrouper, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_SeriesBinGrouper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_SeriesBinGrouper, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_3lib_SeriesBinGrouper, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_SeriesBinGrouper, /*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_3lib_SeriesGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_SeriesGrouper *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o);
  p->arr = Py_None; Py_INCREF(Py_None);
  p->index = Py_None; Py_INCREF(Py_None);
  p->dummy_arr = Py_None; Py_INCREF(Py_None);
  p->dummy_index = Py_None; Py_INCREF(Py_None);
  p->f = Py_None; Py_INCREF(Py_None);
  p->labels = Py_None; Py_INCREF(Py_None);
  p->values = Py_None; Py_INCREF(Py_None);
  p->typ = Py_None; Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_SeriesGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o;
  Py_CLEAR(p->arr);
  Py_CLEAR(p->index);
  Py_CLEAR(p->dummy_arr);
  Py_CLEAR(p->dummy_index);
  Py_CLEAR(p->f);
  Py_CLEAR(p->labels);
  Py_CLEAR(p->values);
  Py_CLEAR(p->typ);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_SeriesGrouper(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_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_arr) {
    e = (*v)(p->dummy_arr, a); if (e) return e;
  }
  if (p->dummy_index) {
    e = (*v)(p->dummy_index, 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;
  }
  if (p->values) {
    e = (*v)(p->values, a); if (e) return e;
  }
  if (p->typ) {
    e = (*v)(p->typ, 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_3lib_SeriesGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_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_arr);
  p->dummy_arr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dummy_index);
  p->dummy_index = 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);
  tmp = ((PyObject*)p->values);
  p->values = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->typ);
  p->typ = 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_getprop_6pandas_3lib_13SeriesGrouper_arr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_arr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_f(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_labels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_labels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_values(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_typ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_typ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pandas_3lib_SeriesGrouper[] = {
  {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_3lib_SeriesGrouper[] = {
  {(char *)"arr", __pyx_getprop_6pandas_3lib_13SeriesGrouper_arr, __pyx_setprop_6pandas_3lib_13SeriesGrouper_arr, 0, 0},
  {(char *)"index", __pyx_getprop_6pandas_3lib_13SeriesGrouper_index, __pyx_setprop_6pandas_3lib_13SeriesGrouper_index, 0, 0},
  {(char *)"dummy_arr", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_arr, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_arr, 0, 0},
  {(char *)"dummy_index", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_index, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_index, 0, 0},
  {(char *)"f", __pyx_getprop_6pandas_3lib_13SeriesGrouper_f, __pyx_setprop_6pandas_3lib_13SeriesGrouper_f, 0, 0},
  {(char *)"labels", __pyx_getprop_6pandas_3lib_13SeriesGrouper_labels, __pyx_setprop_6pandas_3lib_13SeriesGrouper_labels, 0, 0},
  {(char *)"values", __pyx_getprop_6pandas_3lib_13SeriesGrouper_values, __pyx_setprop_6pandas_3lib_13SeriesGrouper_values, 0, 0},
  {(char *)"typ", __pyx_getprop_6pandas_3lib_13SeriesGrouper_typ, __pyx_setprop_6pandas_3lib_13SeriesGrouper_typ, 0, 0},
  {(char *)"name", __pyx_getprop_6pandas_3lib_13SeriesGrouper_name, __pyx_setprop_6pandas_3lib_13SeriesGrouper_name, 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_3lib_SeriesGrouper = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.SeriesGrouper"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_SeriesGrouper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_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_3lib_SeriesGrouper, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_SeriesGrouper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_SeriesGrouper, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_3lib_SeriesGrouper, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_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_3lib_Slider __pyx_vtable_6pandas_3lib_Slider;

static PyObject *__pyx_tp_new_6pandas_3lib_Slider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_Slider *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_Slider *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_3lib_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_3lib_Slider(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o;
  Py_CLEAR(p->values);
  Py_CLEAR(p->buf);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_Slider(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_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_3lib_Slider(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_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_3lib_Slider[] = {
  {__Pyx_NAMESTR("advance"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_3advance, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_length"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_5set_length, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_7reset, METH_NOARGS, __Pyx_DOCSTR(0)},
  {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_3lib_Slider = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.Slider"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_Slider), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_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_3lib_Slider, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_Slider, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_Slider, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_6Slider_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_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 struct __pyx_vtabstruct_6pandas_3lib_BlockSlider __pyx_vtable_6pandas_3lib_BlockSlider;

static PyObject *__pyx_tp_new_6pandas_3lib_BlockSlider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_BlockSlider *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_BlockSlider *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_3lib_BlockSlider;
  p->frame = Py_None; Py_INCREF(Py_None);
  p->dummy = Py_None; Py_INCREF(Py_None);
  p->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); Py_INCREF(Py_None);
  p->blocks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_BlockSlider(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->frame);
  Py_CLEAR(p->dummy);
  Py_CLEAR(p->idx_slider);
  Py_CLEAR(p->blocks);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_BlockSlider(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o;
  if (p->frame) {
    e = (*v)(p->frame, a); if (e) return e;
  }
  if (p->dummy) {
    e = (*v)(p->dummy, a); if (e) return e;
  }
  if (p->idx_slider) {
    e = (*v)(((PyObject*)p->idx_slider), a); if (e) return e;
  }
  if (p->blocks) {
    e = (*v)(p->blocks, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_3lib_BlockSlider(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->frame);
  p->frame = 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->idx_slider);
  p->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->blocks);
  p->blocks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_frame(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_11BlockSlider_frame(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_dummy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_11BlockSlider_dummy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_nblocks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_11BlockSlider_nblocks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_idx_slider(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_11BlockSlider_idx_slider(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_blocks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_11BlockSlider_blocks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pandas_3lib_BlockSlider[] = {
  {__Pyx_NAMESTR("move"), (PyCFunction)__pyx_pw_6pandas_3lib_11BlockSlider_5move, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_3lib_BlockSlider[] = {
  {(char *)"frame", __pyx_getprop_6pandas_3lib_11BlockSlider_frame, __pyx_setprop_6pandas_3lib_11BlockSlider_frame, 0, 0},
  {(char *)"dummy", __pyx_getprop_6pandas_3lib_11BlockSlider_dummy, __pyx_setprop_6pandas_3lib_11BlockSlider_dummy, 0, 0},
  {(char *)"nblocks", __pyx_getprop_6pandas_3lib_11BlockSlider_nblocks, __pyx_setprop_6pandas_3lib_11BlockSlider_nblocks, 0, 0},
  {(char *)"idx_slider", __pyx_getprop_6pandas_3lib_11BlockSlider_idx_slider, __pyx_setprop_6pandas_3lib_11BlockSlider_idx_slider, 0, 0},
  {(char *)"blocks", __pyx_getprop_6pandas_3lib_11BlockSlider_blocks, __pyx_setprop_6pandas_3lib_11BlockSlider_blocks, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_BlockSlider = {
  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_BlockSlider = {
  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_BlockSlider = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_BlockSlider = {
  #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_3lib_BlockSlider = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.BlockSlider"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_BlockSlider), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_BlockSlider, /*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_BlockSlider, /*tp_as_number*/
  &__pyx_tp_as_sequence_BlockSlider, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_BlockSlider, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_BlockSlider, /*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 capable of sliding on axis=0\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_3lib_BlockSlider, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_BlockSlider, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_BlockSlider, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_3lib_BlockSlider, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_11BlockSlider_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_BlockSlider, /*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_3lib_cache_readonly(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_cache_readonly *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_cache_readonly *)o);
  p->func = Py_None; Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  p->allow_setting = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_cache_readonly(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o;
  Py_CLEAR(p->func);
  Py_CLEAR(p->name);
  Py_CLEAR(p->allow_setting);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_cache_readonly(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o;
  if (p->func) {
    e = (*v)(p->func, a); if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  if (p->allow_setting) {
    e = (*v)(p->allow_setting, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_3lib_cache_readonly(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->func);
  p->func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->allow_setting);
  p->allow_setting = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_descr_get_6pandas_3lib_cache_readonly(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_3lib_14cache_readonly_5__get__(o, i, c);
  return r;
}

static int __pyx_tp_descr_set_6pandas_3lib_cache_readonly(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(o, i, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__delete__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_func(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_allow_setting(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_3lib_cache_readonly[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_3lib_cache_readonly[] = {
  {(char *)"func", __pyx_getprop_6pandas_3lib_14cache_readonly_func, 0, 0, 0},
  {(char *)"name", __pyx_getprop_6pandas_3lib_14cache_readonly_name, 0, 0, 0},
  {(char *)"allow_setting", __pyx_getprop_6pandas_3lib_14cache_readonly_allow_setting, 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_3lib_cache_readonly = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.cache_readonly"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_cache_readonly), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_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*/
  __pyx_pw_6pandas_3lib_14cache_readonly_3__call__, /*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_3lib_cache_readonly, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_cache_readonly, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_cache_readonly, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_3lib_cache_readonly, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_3lib_cache_readonly, /*tp_descr_get*/
  __pyx_tp_descr_set_6pandas_3lib_cache_readonly, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_14cache_readonly_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_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_3lib_AxisProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_AxisProperty(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_descr_get_6pandas_3lib_AxisProperty(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_3lib_12AxisProperty_3__get__(o, i, c);
  return r;
}

static int __pyx_tp_descr_set_6pandas_3lib_AxisProperty(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(o, i, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__delete__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_3lib_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_3lib_AxisProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.AxisProperty"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_AxisProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_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_3lib_AxisProperty, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_3lib_AxisProperty, /*tp_descr_get*/
  __pyx_tp_descr_set_6pandas_3lib_AxisProperty, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_12AxisProperty_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_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_3lib___pyx_scope_struct__try_parse_dates(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o);
  p->__pyx_v_dayfirst = 0;
  p->__pyx_v_default = 0;
  p->__pyx_v_parse = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o;
  Py_CLEAR(p->__pyx_v_dayfirst);
  Py_CLEAR(p->__pyx_v_default);
  Py_CLEAR(p->__pyx_v_parse);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o;
  if (p->__pyx_v_dayfirst) {
    e = (*v)(p->__pyx_v_dayfirst, a); if (e) return e;
  }
  if (p->__pyx_v_default) {
    e = (*v)(p->__pyx_v_default, a); if (e) return e;
  }
  if (p->__pyx_v_parse) {
    e = (*v)(p->__pyx_v_parse, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_dayfirst);
  p->__pyx_v_dayfirst = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_default);
  p->__pyx_v_default = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_parse);
  p->__pyx_v_parse = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_3lib___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_3lib___pyx_scope_struct__try_parse_dates = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.__pyx_scope_struct__try_parse_dates"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib___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_3lib___pyx_scope_struct__try_parse_dates, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib___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_3lib___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 PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o);
  p->__pyx_v_date = 0;
  p->__pyx_v_dayfirst = 0;
  p->__pyx_v_default = 0;
  p->__pyx_v_parse = 0;
  p->__pyx_v_time = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o;
  Py_CLEAR(p->__pyx_v_date);
  Py_CLEAR(p->__pyx_v_dayfirst);
  Py_CLEAR(p->__pyx_v_default);
  Py_CLEAR(p->__pyx_v_parse);
  Py_CLEAR(p->__pyx_v_time);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o;
  if (p->__pyx_v_date) {
    e = (*v)(p->__pyx_v_date, a); if (e) return e;
  }
  if (p->__pyx_v_dayfirst) {
    e = (*v)(p->__pyx_v_dayfirst, a); if (e) return e;
  }
  if (p->__pyx_v_default) {
    e = (*v)(p->__pyx_v_default, a); if (e) return e;
  }
  if (p->__pyx_v_parse) {
    e = (*v)(p->__pyx_v_parse, a); if (e) return e;
  }
  if (p->__pyx_v_time) {
    e = (*v)(p->__pyx_v_time, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o) {
  struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_date);
  p->__pyx_v_date = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_dayfirst);
  p->__pyx_v_dayfirst = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_default);
  p->__pyx_v_default = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_parse);
  p->__pyx_v_parse = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_time);
  p->__pyx_v_time = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_try_parse_date_and_time = {
  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_1_try_parse_date_and_time = {
  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_1_try_parse_date_and_time = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_try_parse_date_and_time = {
  #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_3lib___pyx_scope_struct_1_try_parse_date_and_time = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.__pyx_scope_struct_1_try_parse_date_and_time"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*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_1_try_parse_date_and_time, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_1_try_parse_date_and_time, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_1_try_parse_date_and_time, /*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_1_try_parse_date_and_time, /*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_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*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_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("map_indices_list"), (PyCFunction)__pyx_pw_6pandas_3lib_1map_indices_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_map_indices_list)},
  {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_3lib_5to_datetime, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("to_timestamp"), (PyCFunction)__pyx_pw_6pandas_3lib_7to_timestamp, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("checknull"), (PyCFunction)__pyx_pw_6pandas_3lib_13checknull, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("checknull_old"), (PyCFunction)__pyx_pw_6pandas_3lib_15checknull_old, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("astype_str"), (PyCFunction)__pyx_pw_6pandas_3lib_65astype_str, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("lib"),
    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_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
  {&__pyx_kp_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_n_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 1},
  {&__pyx_n_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 1},
  {&__pyx_n_s_127, __pyx_k_127, sizeof(__pyx_k_127), 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_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 1},
  {&__pyx_n_s_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 1, 1},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_n_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 1},
  {&__pyx_n_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 1},
  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
  {&__pyx_n_s_179, __pyx_k_179, sizeof(__pyx_k_179), 0, 0, 1, 1},
  {&__pyx_n_s_196, __pyx_k_196, sizeof(__pyx_k_196), 0, 0, 1, 1},
  {&__pyx_kp_s_197, __pyx_k_197, sizeof(__pyx_k_197), 0, 0, 1, 0},
  {&__pyx_n_s_198, __pyx_k_198, sizeof(__pyx_k_198), 0, 0, 1, 1},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_201, __pyx_k_201, sizeof(__pyx_k_201), 0, 0, 1, 0},
  {&__pyx_n_s_230, __pyx_k_230, sizeof(__pyx_k_230), 0, 0, 1, 1},
  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
  {&__pyx_n_s_243, __pyx_k_243, sizeof(__pyx_k_243), 0, 0, 1, 1},
  {&__pyx_n_s_252, __pyx_k_252, sizeof(__pyx_k_252), 0, 0, 1, 1},
  {&__pyx_n_s_255, __pyx_k_255, sizeof(__pyx_k_255), 0, 0, 1, 1},
  {&__pyx_n_s_258, __pyx_k_258, sizeof(__pyx_k_258), 0, 0, 1, 1},
  {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
  {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_n_s_271, __pyx_k_271, sizeof(__pyx_k_271), 0, 0, 1, 1},
  {&__pyx_n_s_274, __pyx_k_274, sizeof(__pyx_k_274), 0, 0, 1, 1},
  {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1},
  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
  {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
  {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
  {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
  {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0},
  {&__pyx_n_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 1},
  {&__pyx_n_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 1},
  {&__pyx_n_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 1},
  {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0},
  {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
  {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1},
  {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0},
  {&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0},
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
  {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
  {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1},
  {&__pyx_n_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 1},
  {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
  {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0},
  {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
  {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
  {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
  {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
  {&__pyx_kp_u_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 1, 0, 0},
  {&__pyx_kp_u_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 1, 0, 0},
  {&__pyx_kp_u_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 1, 0, 0},
  {&__pyx_kp_u_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 1, 0, 0},
  {&__pyx_kp_u_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 1, 0, 0},
  {&__pyx_kp_u_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 1, 0, 0},
  {&__pyx_kp_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 0},
  {&__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__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__InvalidApply, __pyx_k__InvalidApply, sizeof(__pyx_k__InvalidApply), 0, 0, 1, 1},
  {&__pyx_n_s__LooseVersion, __pyx_k__LooseVersion, sizeof(__pyx_k__LooseVersion), 0, 0, 1, 1},
  {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1},
  {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1},
  {&__pyx_n_s__NaT, __pyx_k__NaT, sizeof(__pyx_k__NaT), 0, 0, 1, 1},
  {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1},
  {&__pyx_n_s__OverflowError, __pyx_k__OverflowError, sizeof(__pyx_k__OverflowError), 0, 0, 1, 1},
  {&__pyx_n_s__Period, __pyx_k__Period, sizeof(__pyx_k__Period), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__TRUE, __pyx_k__TRUE, sizeof(__pyx_k__TRUE), 0, 0, 1, 1},
  {&__pyx_n_s__Timestamp, __pyx_k__Timestamp, sizeof(__pyx_k__Timestamp), 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____len__, __pyx_k____len__, sizeof(__pyx_k____len__), 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____setattr__, __pyx_k____setattr__, sizeof(__pyx_k____setattr__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1},
  {&__pyx_n_s___block, __pyx_k___block, sizeof(__pyx_k___block), 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___data, __pyx_k___data, sizeof(__pyx_k___data), 0, 0, 1, 1},
  {&__pyx_n_s___engine, __pyx_k___engine, sizeof(__pyx_k___engine), 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___index, __pyx_k___index, sizeof(__pyx_k___index), 0, 0, 1, 1},
  {&__pyx_n_s___item_cache, __pyx_k___item_cache, sizeof(__pyx_k___item_cache), 0, 0, 1, 1},
  {&__pyx_n_s___set_axis, __pyx_k___set_axis, sizeof(__pyx_k___set_axis), 0, 0, 1, 1},
  {&__pyx_n_s___values, __pyx_k___values, sizeof(__pyx_k___values), 0, 0, 1, 1},
  {&__pyx_n_s__advance, __pyx_k__advance, sizeof(__pyx_k__advance), 0, 0, 1, 1},
  {&__pyx_n_s__all_arrays, __pyx_k__all_arrays, sizeof(__pyx_k__all_arrays), 0, 0, 1, 1},
  {&__pyx_n_s__allow_setting, __pyx_k__allow_setting, sizeof(__pyx_k__allow_setting), 0, 0, 1, 1},
  {&__pyx_n_s__apply_frame_axis0, __pyx_k__apply_frame_axis0, sizeof(__pyx_k__apply_frame_axis0), 0, 0, 1, 1},
  {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1},
  {&__pyx_n_s__arobj, __pyx_k__arobj, sizeof(__pyx_k__arobj), 0, 0, 1, 1},
  {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1},
  {&__pyx_n_s__array_to_timestamp, __pyx_k__array_to_timestamp, sizeof(__pyx_k__array_to_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s__arrays, __pyx_k__arrays, sizeof(__pyx_k__arrays), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap, __pyx_k__arrmap, sizeof(__pyx_k__arrmap), 0, 0, 1, 1},
  {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1},
  {&__pyx_n_s__astype_intsafe, __pyx_k__astype_intsafe, sizeof(__pyx_k__astype_intsafe), 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__bc, __pyx_k__bc, sizeof(__pyx_k__bc), 0, 0, 1, 1},
  {&__pyx_n_s__binner, __pyx_k__binner, sizeof(__pyx_k__binner), 0, 0, 1, 1},
  {&__pyx_n_s__bins, __pyx_k__bins, sizeof(__pyx_k__bins), 0, 0, 1, 1},
  {&__pyx_n_s__blocks, __pyx_k__blocks, sizeof(__pyx_k__blocks), 0, 0, 1, 1},
  {&__pyx_n_s__bool_, __pyx_k__bool_, sizeof(__pyx_k__bool_), 0, 0, 1, 1},
  {&__pyx_n_s__boolean, __pyx_k__boolean, sizeof(__pyx_k__boolean), 0, 0, 1, 1},
  {&__pyx_n_s__bools, __pyx_k__bools, sizeof(__pyx_k__bools), 0, 0, 1, 1},
  {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1},
  {&__pyx_n_s__c16, __pyx_k__c16, sizeof(__pyx_k__c16), 0, 0, 1, 1},
  {&__pyx_n_s__c_contiguous, __pyx_k__c_contiguous, sizeof(__pyx_k__c_contiguous), 0, 0, 1, 1},
  {&__pyx_n_s__cache, __pyx_k__cache, sizeof(__pyx_k__cache), 0, 0, 1, 1},
  {&__pyx_n_s__chunk, __pyx_k__chunk, sizeof(__pyx_k__chunk), 0, 0, 1, 1},
  {&__pyx_n_s__clean_index_list, __pyx_k__clean_index_list, sizeof(__pyx_k__clean_index_list), 0, 0, 1, 1},
  {&__pyx_n_s__clear_mapping, __pyx_k__clear_mapping, sizeof(__pyx_k__clear_mapping), 0, 0, 1, 1},
  {&__pyx_n_s__closed, __pyx_k__closed, sizeof(__pyx_k__closed), 0, 0, 1, 1},
  {&__pyx_n_s__coerce_numeric, __pyx_k__coerce_numeric, sizeof(__pyx_k__coerce_numeric), 0, 0, 1, 1},
  {&__pyx_n_s__col, __pyx_k__col, sizeof(__pyx_k__col), 0, 0, 1, 1},
  {&__pyx_n_s__cols, __pyx_k__cols, sizeof(__pyx_k__cols), 0, 0, 1, 1},
  {&__pyx_n_s__columns, __pyx_k__columns, sizeof(__pyx_k__columns), 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__complexes, __pyx_k__complexes, sizeof(__pyx_k__complexes), 0, 0, 1, 1},
  {&__pyx_n_s__contiguous, __pyx_k__contiguous, sizeof(__pyx_k__contiguous), 0, 0, 1, 1},
  {&__pyx_n_s__convert, __pyx_k__convert, sizeof(__pyx_k__convert), 0, 0, 1, 1},
  {&__pyx_n_s__convert_datetime, __pyx_k__convert_datetime, sizeof(__pyx_k__convert_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__convert_empty, __pyx_k__convert_empty, sizeof(__pyx_k__convert_empty), 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_timedelta, __pyx_k__convert_timedelta, sizeof(__pyx_k__convert_timedelta), 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__converted, __pyx_k__converted, sizeof(__pyx_k__converted), 0, 0, 1, 1},
  {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 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__counts, __pyx_k__counts, sizeof(__pyx_k__counts), 0, 0, 1, 1},
  {&__pyx_n_s__cur, __pyx_k__cur, sizeof(__pyx_k__cur), 0, 0, 1, 1},
  {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__data_index, __pyx_k__data_index, sizeof(__pyx_k__data_index), 0, 0, 1, 1},
  {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1},
  {&__pyx_n_s__date_parser, __pyx_k__date_parser, sizeof(__pyx_k__date_parser), 0, 0, 1, 1},
  {&__pyx_n_s__dates, __pyx_k__dates, sizeof(__pyx_k__dates), 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__datetimes, __pyx_k__datetimes, sizeof(__pyx_k__datetimes), 0, 0, 1, 1},
  {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 0, 0, 1, 1},
  {&__pyx_n_s__dayfirst, __pyx_k__dayfirst, sizeof(__pyx_k__dayfirst), 0, 0, 1, 1},
  {&__pyx_n_s__days, __pyx_k__days, sizeof(__pyx_k__days), 0, 0, 1, 1},
  {&__pyx_n_s__default, __pyx_k__default, sizeof(__pyx_k__default), 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__doc, __pyx_k__doc, sizeof(__pyx_k__doc), 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__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
  {&__pyx_n_s__ends, __pyx_k__ends, sizeof(__pyx_k__ends), 0, 0, 1, 1},
  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
  {&__pyx_n_s__eq, __pyx_k__eq, sizeof(__pyx_k__eq), 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__false, __pyx_k__false, sizeof(__pyx_k__false), 0, 0, 1, 1},
  {&__pyx_n_s__false_vals, __pyx_k__false_vals, sizeof(__pyx_k__false_vals), 0, 0, 1, 1},
  {&__pyx_n_s__false_values, __pyx_k__false_values, sizeof(__pyx_k__false_values), 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__fast_zip_fillna, __pyx_k__fast_zip_fillna, sizeof(__pyx_k__fast_zip_fillna), 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__finished, __pyx_k__finished, sizeof(__pyx_k__finished), 0, 0, 1, 1},
  {&__pyx_n_s__flag, __pyx_k__flag, sizeof(__pyx_k__flag), 0, 0, 1, 1},
  {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1},
  {&__pyx_n_s__float128, __pyx_k__float128, sizeof(__pyx_k__float128), 0, 0, 1, 1},
  {&__pyx_n_s__float16, __pyx_k__float16, sizeof(__pyx_k__float16), 0, 0, 1, 1},
  {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1},
  {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1},
  {&__pyx_n_s__float_secs, __pyx_k__float_secs, sizeof(__pyx_k__float_secs), 0, 0, 1, 1},
  {&__pyx_n_s__floating, __pyx_k__floating, sizeof(__pyx_k__floating), 0, 0, 1, 1},
  {&__pyx_n_s__floats, __pyx_k__floats, sizeof(__pyx_k__floats), 0, 0, 1, 1},
  {&__pyx_n_s__fnan, __pyx_k__fnan, sizeof(__pyx_k__fnan), 0, 0, 1, 1},
  {&__pyx_n_s__frame, __pyx_k__frame, sizeof(__pyx_k__frame), 0, 0, 1, 1},
  {&__pyx_n_s__fromtimestamp, __pyx_k__fromtimestamp, sizeof(__pyx_k__fromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1},
  {&__pyx_n_s__fval, __pyx_k__fval, sizeof(__pyx_k__fval), 0, 0, 1, 1},
  {&__pyx_n_s__ge, __pyx_k__ge, sizeof(__pyx_k__ge), 0, 0, 1, 1},
  {&__pyx_n_s__gen, __pyx_k__gen, sizeof(__pyx_k__gen), 0, 0, 1, 1},
  {&__pyx_n_s__generate_bins_dt64, __pyx_k__generate_bins_dt64, sizeof(__pyx_k__generate_bins_dt64), 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_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__gin, __pyx_k__gin, sizeof(__pyx_k__gin), 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_size, __pyx_k__group_size, sizeof(__pyx_k__group_size), 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__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1},
  {&__pyx_n_s__hours, __pyx_k__hours, sizeof(__pyx_k__hours), 0, 0, 1, 1},
  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
  {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1},
  {&__pyx_n_s__iNaT, __pyx_k__iNaT, sizeof(__pyx_k__iNaT), 0, 0, 1, 1},
  {&__pyx_n_s__idatetimes, __pyx_k__idatetimes, sizeof(__pyx_k__idatetimes), 0, 0, 1, 1},
  {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 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__indices_fast, __pyx_k__indices_fast, sizeof(__pyx_k__indices_fast), 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__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__int8, __pyx_k__int8, sizeof(__pyx_k__int8), 0, 0, 1, 1},
  {&__pyx_n_s__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 0, 1, 1},
  {&__pyx_n_s__ints, __pyx_k__ints, sizeof(__pyx_k__ints), 0, 0, 1, 1},
  {&__pyx_n_s__is_bool_array, __pyx_k__is_bool_array, sizeof(__pyx_k__is_bool_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_date_array, __pyx_k__is_date_array, sizeof(__pyx_k__is_date_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_datelike, __pyx_k__is_datelike, sizeof(__pyx_k__is_datelike), 0, 0, 1, 1},
  {&__pyx_n_s__is_datetime64_array, __pyx_k__is_datetime64_array, sizeof(__pyx_k__is_datetime64_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_period, __pyx_k__is_period, sizeof(__pyx_k__is_period), 0, 0, 1, 1},
  {&__pyx_n_s__is_period_array, __pyx_k__is_period_array, sizeof(__pyx_k__is_period_array), 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__is_time_array, __pyx_k__is_time_array, sizeof(__pyx_k__is_time_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_timedelta_array, __pyx_k__is_timedelta_array, sizeof(__pyx_k__is_timedelta_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_unicode_array, __pyx_k__is_unicode_array, sizeof(__pyx_k__is_unicode_array), 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__isnullobj2d_old, __pyx_k__isnullobj2d_old, sizeof(__pyx_k__isnullobj2d_old), 0, 0, 1, 1},
  {&__pyx_n_s__isnullobj_old, __pyx_k__isnullobj_old, sizeof(__pyx_k__isnullobj_old), 0, 0, 1, 1},
  {&__pyx_n_s__isscalar, __pyx_k__isscalar, sizeof(__pyx_k__isscalar), 0, 0, 1, 1},
  {&__pyx_n_s__it, __pyx_k__it, sizeof(__pyx_k__it), 0, 0, 1, 1},
  {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1},
  {&__pyx_n_s__item_cache, __pyx_k__item_cache, sizeof(__pyx_k__item_cache), 0, 0, 1, 1},
  {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1},
  {&__pyx_n_s__itimedeltas, __pyx_k__itimedeltas, sizeof(__pyx_k__itimedeltas), 0, 0, 1, 1},
  {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1},
  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
  {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
  {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1},
  {&__pyx_n_s__l_bin, __pyx_k__l_bin, sizeof(__pyx_k__l_bin), 0, 0, 1, 1},
  {&__pyx_n_s__lab, __pyx_k__lab, sizeof(__pyx_k__lab), 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__lenbin, __pyx_k__lenbin, sizeof(__pyx_k__lenbin), 0, 0, 1, 1},
  {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1},
  {&__pyx_n_s__lenidx, __pyx_k__lenidx, sizeof(__pyx_k__lenidx), 0, 0, 1, 1},
  {&__pyx_n_s__list_of_arrays, __pyx_k__list_of_arrays, sizeof(__pyx_k__list_of_arrays), 0, 0, 1, 1},
  {&__pyx_n_s__lists, __pyx_k__lists, sizeof(__pyx_k__lists), 0, 0, 1, 1},
  {&__pyx_n_s__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__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1},
  {&__pyx_n_s__map_infer, __pyx_k__map_infer, sizeof(__pyx_k__map_infer), 0, 0, 1, 1},
  {&__pyx_n_s__map_infer_mask, __pyx_k__map_infer_mask, sizeof(__pyx_k__map_infer_mask), 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__maybe_convert_bool, __pyx_k__maybe_convert_bool, sizeof(__pyx_k__maybe_convert_bool), 0, 0, 1, 1},
  {&__pyx_n_s__memo, __pyx_k__memo, sizeof(__pyx_k__memo), 0, 0, 1, 1},
  {&__pyx_n_s__micros, __pyx_k__micros, sizeof(__pyx_k__micros), 0, 0, 1, 1},
  {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1},
  {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1},
  {&__pyx_n_s__minutes, __pyx_k__minutes, sizeof(__pyx_k__minutes), 0, 0, 1, 1},
  {&__pyx_n_s__mixed, __pyx_k__mixed, sizeof(__pyx_k__mixed), 0, 0, 1, 1},
  {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1},
  {&__pyx_n_s__months, __pyx_k__months, sizeof(__pyx_k__months), 0, 0, 1, 1},
  {&__pyx_n_s__move, __pyx_k__move, sizeof(__pyx_k__move), 0, 0, 1, 1},
  {&__pyx_n_s__mutated, __pyx_k__mutated, sizeof(__pyx_k__mutated), 0, 0, 1, 1},
  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__na_count, __pyx_k__na_count, sizeof(__pyx_k__na_count), 0, 0, 1, 1},
  {&__pyx_n_s__na_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__nan_rep, __pyx_k__nan_rep, sizeof(__pyx_k__nan_rep), 0, 0, 1, 1},
  {&__pyx_n_s__ncols, __pyx_k__ncols, sizeof(__pyx_k__ncols), 0, 0, 1, 1},
  {&__pyx_n_s__ndarrays, __pyx_k__ndarrays, sizeof(__pyx_k__ndarrays), 0, 0, 1, 1},
  {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1},
  {&__pyx_n_s__ne, __pyx_k__ne, sizeof(__pyx_k__ne), 0, 0, 1, 1},
  {&__pyx_n_s__neginf, __pyx_k__neginf, sizeof(__pyx_k__neginf), 0, 0, 1, 1},
  {&__pyx_n_s__new_dtype, __pyx_k__new_dtype, sizeof(__pyx_k__new_dtype), 0, 0, 1, 1},
  {&__pyx_n_s__ngroups, __pyx_k__ngroups, sizeof(__pyx_k__ngroups), 0, 0, 1, 1},
  {&__pyx_n_s__nlevels, __pyx_k__nlevels, sizeof(__pyx_k__nlevels), 0, 0, 1, 1},
  {&__pyx_n_s__now, __pyx_k__now, sizeof(__pyx_k__now), 0, 0, 1, 1},
  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
  {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1},
  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
  {&__pyx_n_s__o, __pyx_k__o, sizeof(__pyx_k__o), 0, 0, 1, 1},
  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
  {&__pyx_n_s__objbuf, __pyx_k__objbuf, sizeof(__pyx_k__objbuf), 0, 0, 1, 1},
  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
  {&__pyx_n_s__object_, __pyx_k__object_, sizeof(__pyx_k__object_), 0, 0, 1, 1},
  {&__pyx_n_s__objects, __pyx_k__objects, sizeof(__pyx_k__objects), 0, 0, 1, 1},
  {&__pyx_n_s__onan, __pyx_k__onan, sizeof(__pyx_k__onan), 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__out, __pyx_k__out, sizeof(__pyx_k__out), 0, 0, 1, 1},
  {&__pyx_n_s__output, __pyx_k__output, sizeof(__pyx_k__output), 0, 0, 1, 1},
  {&__pyx_n_s__pandas, __pyx_k__pandas, sizeof(__pyx_k__pandas), 0, 0, 1, 1},
  {&__pyx_n_s__pandas_null, __pyx_k__pandas_null, sizeof(__pyx_k__pandas_null), 0, 0, 1, 1},
  {&__pyx_n_s__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 0, 1, 1},
  {&__pyx_n_s__parse_date, __pyx_k__parse_date, sizeof(__pyx_k__parse_date), 0, 0, 1, 1},
  {&__pyx_n_s__parse_time, __pyx_k__parse_time, sizeof(__pyx_k__parse_time), 0, 0, 1, 1},
  {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
  {&__pyx_n_s__period, __pyx_k__period, sizeof(__pyx_k__period), 0, 0, 1, 1},
  {&__pyx_n_s__piece, __pyx_k__piece, sizeof(__pyx_k__piece), 0, 0, 1, 1},
  {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
  {&__pyx_n_s__pre, __pyx_k__pre, sizeof(__pyx_k__pre), 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__r_bin, __pyx_k__r_bin, sizeof(__pyx_k__r_bin), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__ravel, __pyx_k__ravel, sizeof(__pyx_k__ravel), 0, 0, 1, 1},
  {&__pyx_n_s__reduce, __pyx_k__reduce, sizeof(__pyx_k__reduce), 0, 0, 1, 1},
  {&__pyx_n_s__reducer, __pyx_k__reducer, sizeof(__pyx_k__reducer), 0, 0, 1, 1},
  {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1},
  {&__pyx_n_s__repr_timedelta64, __pyx_k__repr_timedelta64, sizeof(__pyx_k__repr_timedelta64), 0, 0, 1, 1},
  {&__pyx_n_s__reset, __pyx_k__reset, sizeof(__pyx_k__reset), 0, 0, 1, 1},
  {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1},
  {&__pyx_n_s__results, __pyx_k__results, sizeof(__pyx_k__results), 0, 0, 1, 1},
  {&__pyx_n_s__rev_indexer, __pyx_k__rev_indexer, sizeof(__pyx_k__rev_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1},
  {&__pyx_n_s__right_closed, __pyx_k__right_closed, sizeof(__pyx_k__right_closed), 0, 0, 1, 1},
  {&__pyx_n_s__row, __pyx_k__row, sizeof(__pyx_k__row), 0, 0, 1, 1},
  {&__pyx_n_s__row_bool_subset, __pyx_k__row_bool_subset, sizeof(__pyx_k__row_bool_subset), 0, 0, 1, 1},
  {&__pyx_n_s__rows, __pyx_k__rows, sizeof(__pyx_k__rows), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__safe, __pyx_k__safe, sizeof(__pyx_k__safe), 0, 0, 1, 1},
  {&__pyx_n_s__sanitize_objects, __pyx_k__sanitize_objects, sizeof(__pyx_k__sanitize_objects), 0, 0, 1, 1},
  {&__pyx_n_s__scalar_binop, __pyx_k__scalar_binop, sizeof(__pyx_k__scalar_binop), 0, 0, 1, 1},
  {&__pyx_n_s__scalar_compare, __pyx_k__scalar_compare, sizeof(__pyx_k__scalar_compare), 0, 0, 1, 1},
  {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1},
  {&__pyx_n_s__seconds, __pyx_k__seconds, sizeof(__pyx_k__seconds), 0, 0, 1, 1},
  {&__pyx_n_s__secs, __pyx_k__secs, sizeof(__pyx_k__secs), 0, 0, 1, 1},
  {&__pyx_n_s__seen, __pyx_k__seen, sizeof(__pyx_k__seen), 0, 0, 1, 1},
  {&__pyx_n_s__seen_bool, __pyx_k__seen_bool, sizeof(__pyx_k__seen_bool), 0, 0, 1, 1},
  {&__pyx_n_s__seen_complex, __pyx_k__seen_complex, sizeof(__pyx_k__seen_complex), 0, 0, 1, 1},
  {&__pyx_n_s__seen_datetime, __pyx_k__seen_datetime, sizeof(__pyx_k__seen_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__seen_float, __pyx_k__seen_float, sizeof(__pyx_k__seen_float), 0, 0, 1, 1},
  {&__pyx_n_s__seen_int, __pyx_k__seen_int, sizeof(__pyx_k__seen_int), 0, 0, 1, 1},
  {&__pyx_n_s__seen_null, __pyx_k__seen_null, sizeof(__pyx_k__seen_null), 0, 0, 1, 1},
  {&__pyx_n_s__seen_numeric, __pyx_k__seen_numeric, sizeof(__pyx_k__seen_numeric), 0, 0, 1, 1},
  {&__pyx_n_s__seen_object, __pyx_k__seen_object, sizeof(__pyx_k__seen_object), 0, 0, 1, 1},
  {&__pyx_n_s__seen_timedelta, __pyx_k__seen_timedelta, sizeof(__pyx_k__seen_timedelta), 0, 0, 1, 1},
  {&__pyx_n_s__series, __pyx_k__series, sizeof(__pyx_k__series), 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__shape_before, __pyx_k__shape_before, sizeof(__pyx_k__shape_before), 0, 0, 1, 1},
  {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
  {&__pyx_n_s__slider, __pyx_k__slider, sizeof(__pyx_k__slider), 0, 0, 1, 1},
  {&__pyx_n_s__slobj, __pyx_k__slobj, sizeof(__pyx_k__slobj), 0, 0, 1, 1},
  {&__pyx_n_s__sorted_labels, __pyx_k__sorted_labels, sizeof(__pyx_k__sorted_labels), 0, 0, 1, 1},
  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
  {&__pyx_n_s__started, __pyx_k__started, sizeof(__pyx_k__started), 0, 0, 1, 1},
  {&__pyx_n_s__starts, __pyx_k__starts, sizeof(__pyx_k__starts), 0, 0, 1, 1},
  {&__pyx_n_s__status, __pyx_k__status, sizeof(__pyx_k__status), 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__stub, __pyx_k__stub, sizeof(__pyx_k__stub), 0, 0, 1, 1},
  {&__pyx_n_s__sum, __pyx_k__sum, sizeof(__pyx_k__sum), 0, 0, 1, 1},
  {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1},
  {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1},
  {&__pyx_n_s__take_last, __pyx_k__take_last, sizeof(__pyx_k__take_last), 0, 0, 1, 1},
  {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1},
  {&__pyx_n_s__time64_to_datetime, __pyx_k__time64_to_datetime, sizeof(__pyx_k__time64_to_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__time_parser, __pyx_k__time_parser, sizeof(__pyx_k__time_parser), 0, 0, 1, 1},
  {&__pyx_n_s__timedelta, __pyx_k__timedelta, sizeof(__pyx_k__timedelta), 0, 0, 1, 1},
  {&__pyx_n_s__timedelta64, __pyx_k__timedelta64, sizeof(__pyx_k__timedelta64), 0, 0, 1, 1},
  {&__pyx_n_s__timedeltas, __pyx_k__timedeltas, sizeof(__pyx_k__timedeltas), 0, 0, 1, 1},
  {&__pyx_n_s__times, __pyx_k__times, sizeof(__pyx_k__times), 0, 0, 1, 1},
  {&__pyx_n_s__tmp, __pyx_k__tmp, sizeof(__pyx_k__tmp), 0, 0, 1, 1},
  {&__pyx_n_s__to_object_array, __pyx_k__to_object_array, sizeof(__pyx_k__to_object_array), 0, 0, 1, 1},
  {&__pyx_n_s__toordinal, __pyx_k__toordinal, sizeof(__pyx_k__toordinal), 0, 0, 1, 1},
  {&__pyx_n_s__true, __pyx_k__true, sizeof(__pyx_k__true), 0, 0, 1, 1},
  {&__pyx_n_s__true_vals, __pyx_k__true_vals, sizeof(__pyx_k__true_vals), 0, 0, 1, 1},
  {&__pyx_n_s__true_values, __pyx_k__true_values, sizeof(__pyx_k__true_values), 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__tslib, __pyx_k__tslib, sizeof(__pyx_k__tslib), 0, 0, 1, 1},
  {&__pyx_n_s__tup, __pyx_k__tup, sizeof(__pyx_k__tup), 0, 0, 1, 1},
  {&__pyx_n_s__tuples, __pyx_k__tuples, sizeof(__pyx_k__tuples), 0, 0, 1, 1},
  {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
  {&__pyx_n_s__uint16, __pyx_k__uint16, sizeof(__pyx_k__uint16), 0, 0, 1, 1},
  {&__pyx_n_s__uint32, __pyx_k__uint32, sizeof(__pyx_k__uint32), 0, 0, 1, 1},
  {&__pyx_n_s__uint64, __pyx_k__uint64, sizeof(__pyx_k__uint64), 0, 0, 1, 1},
  {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1},
  {&__pyx_n_s__unicode, __pyx_k__unicode, sizeof(__pyx_k__unicode), 0, 0, 1, 1},
  {&__pyx_n_s__unicode_, __pyx_k__unicode_, sizeof(__pyx_k__unicode_), 0, 0, 1, 1},
  {&__pyx_n_s__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__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
  {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
  {&__pyx_n_s__val_kind, __pyx_k__val_kind, sizeof(__pyx_k__val_kind), 0, 0, 1, 1},
  {&__pyx_n_s__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__vc, __pyx_k__vc, sizeof(__pyx_k__vc), 0, 0, 1, 1},
  {&__pyx_n_s__vec_binop, __pyx_k__vec_binop, sizeof(__pyx_k__vec_binop), 0, 0, 1, 1},
  {&__pyx_n_s__vec_compare, __pyx_k__vec_compare, sizeof(__pyx_k__vec_compare), 0, 0, 1, 1},
  {&__pyx_n_s__vecs, __pyx_k__vecs, sizeof(__pyx_k__vecs), 0, 0, 1, 1},
  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
  {&__pyx_n_s__write_csv_rows, __pyx_k__write_csv_rows, sizeof(__pyx_k__write_csv_rows), 0, 0, 1, 1},
  {&__pyx_n_s__writer, __pyx_k__writer, sizeof(__pyx_k__writer), 0, 0, 1, 1},
  {&__pyx_n_s__writerows, __pyx_k__writerows, sizeof(__pyx_k__writerows), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
  {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1},
  {&__pyx_n_s__years, __pyx_k__years, sizeof(__pyx_k__years), 0, 0, 1, 1},
  {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __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 = 30; __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_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __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 = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_OverflowError = __Pyx_GetName(__pyx_b, __pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __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 = 646; __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[5]; __pyx_lineno = 803; __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[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pandas/lib.pyx":165
 * 
 * cdef inline int64_t get_timedelta64_value(val):
 *     return val.view('i8')             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));

  /* "pandas/lib.pyx":451
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 *             raise ValueError('all arrays must be same length')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));

  /* "pandas/lib.pyx":468
 * 
 *     rev_indexer = np.empty(length, dtype=np.int64)
 *     rev_indexer.fill(-1)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         idx = indexer[i]
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_4);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "pandas/lib.pyx":563
 * 
 *     if not started:
 *         return slice(0, 0)             # <<<<<<<<<<<<<<
 *     if not finished:
 *         return slice(start, None)
 */
  __pyx_k_tuple_5 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_5);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "pandas/lib.pyx":593
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=bool).view(np.uint8)
 */
  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_7);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "pandas/lib.pyx":640
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=bool).view(np.uint8)
 */
  __pyx_k_tuple_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_9);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
  PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));

  /* "pandas/lib.pyx":928
 * 
 *     if lenidx <= 0 or lenbin <= 0:
 *         raise ValueError("Invalid length for values or for binner")             # <<<<<<<<<<<<<<
 * 
 *     # check binner fits data
 */
  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_14);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "pandas/lib.pyx":932
 *     # check binner fits data
 *     if values[0] < binner[0]:
 *         raise ValueError("Values falls before first bin")             # <<<<<<<<<<<<<<
 * 
 *     if values[lenidx-1] > binner[lenbin-1]:
 */
  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_16);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));

  /* "pandas/lib.pyx":935
 * 
 *     if values[lenidx-1] > binner[lenbin-1]:
 *         raise ValueError("Values falls after last bin")             # <<<<<<<<<<<<<<
 * 
 *     bins   = np.empty(lenbin - 1, dtype=np.int64)
 */
  __pyx_k_tuple_18 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_17));
  PyTuple_SET_ITEM(__pyx_k_tuple_18, 0, ((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "pandas/lib.pyx":1105
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 *             raise ValueError('all arrays must be same length')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));

  /* "pandas/src/reduce.pyx":24
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:
 *                 arr = arr.copy('F')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = k
 */
  __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__F));
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_n_s__F));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__F));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "pandas/src/reduce.pyx":31
 *         else:
 *             if not arr.flags.c_contiguous:
 *                 arr = arr.copy('C')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = n
 */
  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "pandas/src/reduce.pyx":59
 *         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_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_25);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_24));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));

  /* "pandas/src/reduce.pyx":153
 *             result[0] = res
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_28);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_27));
  PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));

  /* "pandas/src/reduce.pyx":176
 *         values = series.values
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = values
 *         self.index = series.index
 */
  __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));

  /* "pandas/src/reduce.pyx":193
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *             index = None
 *         else:
 */
  __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_30);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));

  /* "pandas/src/reduce.pyx":197
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             values = dummy.values
 *             if not values.flags.contiguous:
 */
  __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_24));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "pandas/src/reduce.pyx":281
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_32);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_27));
  PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));

  /* "pandas/src/reduce.pyx":306
 *         values = series.values
 *         if not values.flags.c_contiguous:
 *             values = values.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = values
 *         self.index = series.index
 */
  __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_33);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));

  /* "pandas/src/reduce.pyx":318
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             values = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *             index  = None
 *         else:
 */
  __pyx_k_tuple_34 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_34);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_34, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));

  /* "pandas/src/reduce.pyx":322
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             values = dummy.values
 *             if not values.flags.contiguous:
 */
  __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_35);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_24));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));

  /* "pandas/src/reduce.pyx":410
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_36);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_27));
  PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));

  /* "pandas/src/reduce.pyx":484
 * 
 *     if frame.index._has_complex_internals:
 *         raise InvalidApply('Cannot modify frame index internals')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_39);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_38));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));

  /* "pandas/src/reduce.pyx":496
 *             result = f(chunk)
 *             if result is chunk:
 *                 raise InvalidApply('Function unsafe for fast apply')             # <<<<<<<<<<<<<<
 *         except:
 *             raise InvalidApply('Let this error raise above us')
 */
  __pyx_k_tuple_41 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_41);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_kp_s_40));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));

  /* "pandas/src/reduce.pyx":498
 *                 raise InvalidApply('Function unsafe for fast apply')
 *         except:
 *             raise InvalidApply('Let this error raise above us')             # <<<<<<<<<<<<<<
 * 
 *     slider = BlockSlider(frame)
 */
  __pyx_k_tuple_43 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_43);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_kp_s_42));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));

  /* "pandas/src/reduce.pyx":593
 * def reduce(arr, f, axis=0, dummy=None, labels=None):
 *     if labels._has_complex_internals:
 *         raise Exception('Cannot use shortcut')             # <<<<<<<<<<<<<<
 * 
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels)
 */
  __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_44));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_44));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_44));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "pandas/src/inference.pyx":53
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_49);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));

  /* "pandas/src/inference.pyx":426
 *                 seen_float = 1
 *             else:
 *                 raise ValueError('Empty string encountered')             # <<<<<<<<<<<<<<
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 */
  __pyx_k_tuple_58 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_58);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_57));
  PyTuple_SET_ITEM(__pyx_k_tuple_58, 0, ((PyObject *)__pyx_kp_s_57));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_57));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));

  /* "pandas/src/inference.pyx":647
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default)
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 */
  __pyx_k_tuple_64 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));
  __pyx_k_codeobj_65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__parse_date, 647, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_65)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":688
 *     n = len(dates)
 *     if len(times) != n:
 *         raise ValueError('Length of dates and times must be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_71);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_70));
  PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_kp_s_70));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));

  /* "pandas/src/inference.pyx":700
 *             parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default)
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return date.strptime(s, '%m/%d/%Y')
 */
  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_72);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
  __pyx_k_codeobj_73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__parse_date, 700, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_73)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":713
 *             parse_time = lambda x: parse(x)
 *         except ImportError: # pragma: no cover
 *             def parse_time(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return time.strptime(s, '%H:%M:%S')
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
  __pyx_k_codeobj_75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__parse_time, 713, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_75)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":741
 *     n = len(years)
 *     if len(months) != n or len(days) != n:
 *         raise ValueError('Length of years/months/days must all be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_k_tuple_77 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_77);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_76));
  PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_kp_s_76));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));

  /* "pandas/src/inference.pyx":768
 *     if (len(months) != n or len(days) != n or len(hours) != n or
 *         len(minutes) != n or len(seconds) != n):
 *         raise ValueError('Length of all datetime components must be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_k_tuple_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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));

  /* "pandas/src/inference.pyx":1017
 *     if n == 0:
 *         # kludge, for Series
 *         return np.empty(0, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_82);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));

  /* "numpy.pxd":217
 *             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_85 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_85);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_84));
  PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, ((PyObject *)__pyx_kp_u_84));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_84));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));

  /* "numpy.pxd":221
 *             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_87 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_87);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_86));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_kp_u_86));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_86));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));

  /* "numpy.pxd":259
 *                 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_89 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_89);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_88));
  PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_kp_u_88));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_88));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));

  /* "numpy.pxd":803
 * 
 *         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_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_92);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_91));
  PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_kp_u_91));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_91));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));

  /* "numpy.pxd":807
 *         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_93 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_93);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_88));
  PyTuple_SET_ITEM(__pyx_k_tuple_93, 0, ((PyObject *)__pyx_kp_u_88));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_88));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93));

  /* "numpy.pxd":827
 *             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_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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));

  /* "util.pxd":40
 *         i += sz
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
  __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_97);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));

  /* "util.pxd":57
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
  __pyx_k_tuple_98 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_98);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, ((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));

  /* "pandas/lib.pyx":85
 * from libc.stdlib cimport malloc, free
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */
  __pyx_k_tuple_99 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_99);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 1, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
  __pyx_k_codeobj_100 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__ismember, 85, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":140
 *     return gmtime(dt)
 * 
 * def array_to_timestamp(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[int64_t, ndim=1] result
 */
  __pyx_k_tuple_102 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_102);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));
  __pyx_k_codeobj_103 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__array_to_timestamp, 140, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_103)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":152
 *     return result
 * 
 * def time64_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[object, ndim=1] result
 */
  __pyx_k_tuple_104 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_104);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));
  __pyx_k_codeobj_105 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__time64_to_datetime, 152, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_105)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":201
 *         return util._checknull(val)
 * 
 * def isscalar(object val):             # <<<<<<<<<<<<<<
 *     return np.isscalar(val) or val is None or PyDateTime_Check(val)
 * 
 */
  __pyx_k_tuple_106 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_106);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_106, 0, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
  __pyx_k_codeobj_107 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__isscalar, 201, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_107)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":207
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_k_tuple_108 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_108);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arobj));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 5, ((PyObject *)__pyx_n_s__arobj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arobj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
  __pyx_k_codeobj_109 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__isnullobj, 207, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_109)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":221
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj_old(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_k_tuple_110 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_110);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
  __pyx_k_codeobj_111 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__isnullobj_old, 221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_111)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":235
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj2d(ndarray[object, ndim=2] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, n, m
 *     cdef object val
 */
  __pyx_k_tuple_112 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_112);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 4, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
  __pyx_k_codeobj_113 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__isnullobj2d, 235, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_113)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":251
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj_old(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_k_tuple_114 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_114);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));
  __pyx_k_codeobj_115 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__isnullobj_old, 251, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_115)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":265
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj2d_old(ndarray[object, ndim=2] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, n, m
 *     cdef object val
 */
  __pyx_k_tuple_116 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_116);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 4, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));
  __pyx_k_codeobj_117 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__isnullobj2d_old, 265, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_117)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":279
 *     return result.view(np.bool_)
 * 
 * def list_to_object_array(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert list to object ndarray. Seriously can't believe I had to write this
 */
  __pyx_k_tuple_118 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_118);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 3, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
  __pyx_k_codeobj_119 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_48, 279, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_119)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":299
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_120 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_120);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 3, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 4, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 6, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));
  __pyx_k_codeobj_121 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__fast_unique, 299, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_121)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":320
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[object] buf
 */
  __pyx_k_tuple_122 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_122);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_n_s__arrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 1, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 2, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 6, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 7, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 9, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
  __pyx_k_codeobj_123 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_124, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_123)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":346
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list(list lists):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_k_tuple_125 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_125);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lists));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 0, ((PyObject *)__pyx_n_s__lists));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lists));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 1, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 2, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 6, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 7, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 9, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
  __pyx_k_codeobj_126 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_127, 346, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_126)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":372
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list_gen(object gen):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_k_tuple_128 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_128);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__gen));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 0, ((PyObject *)__pyx_n_s__gen));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gen));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 1, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 4, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 5, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 7, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));
  __pyx_k_codeobj_129 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_130, 372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_129)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":397
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def dicts_to_array(list dicts, list columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n
 */
  __pyx_k_tuple_131 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_131);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dicts));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 0, ((PyObject *)__pyx_n_s__dicts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dicts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__columns));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 1, ((PyObject *)__pyx_n_s__columns));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__columns));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 7, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__col));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 8, ((PyObject *)__pyx_n_s__col));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__col));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__onan));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 9, ((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
  __pyx_k_codeobj_132 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__dicts_to_array, 397, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_132)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":420
 *     return result
 * 
 * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */
  __pyx_k_tuple_133 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_133)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_133);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ndarrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 0, ((PyObject *)__pyx_n_s__ndarrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ndarrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 3, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__it));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 6, ((PyObject *)__pyx_n_s__it));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__it));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 7, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 8, ((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 9, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_133));
  __pyx_k_codeobj_134 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__fast_zip, 420, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_134)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":461
 *     return result
 * 
 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)
 */
  __pyx_k_tuple_135 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_135);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 1, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rev_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 4, ((PyObject *)__pyx_n_s__rev_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rev_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 5, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
  __pyx_k_codeobj_136 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__get_reverse_indexer, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_136)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":477
 * 
 * 
 * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_137 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_137);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inf));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 3, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__neginf));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 4, ((PyObject *)__pyx_n_s__neginf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__neginf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_137));
  __pyx_k_codeobj_138 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__has_infs_f4, 477, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_138)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":491
 *     return False
 * 
 * def has_infs_f8(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_139 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_139);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inf));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 3, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__neginf));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 4, ((PyObject *)__pyx_n_s__neginf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__neginf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139));
  __pyx_k_codeobj_140 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__has_infs_f8, 491, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_140)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":505
 *     return False
 * 
 * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object val, f, result
 */
  __pyx_k_tuple_141 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_141);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 1, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 2, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cache));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 4, ((PyObject *)__pyx_n_s__cache));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cache));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 7, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 8, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
  __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__convert_timestamps, 505, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":528
 *     return out
 * 
 * def maybe_indices_to_slice(ndarray[int64_t] indices):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indices)
 */
  __pyx_k_tuple_143 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_143);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indices));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 0, ((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indices));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143));
  __pyx_k_codeobj_144 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_145, 528, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_144)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":541
 * 
 * 
 * def maybe_booleans_to_slice(ndarray[uint8_t] mask):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(mask)
 */
  __pyx_k_tuple_146 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_146)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_146);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 3, ((PyObject *)__pyx_n_s__start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__end));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 4, ((PyObject *)__pyx_n_s__end));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__started));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 5, ((PyObject *)__pyx_n_s__started));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__started));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__finished));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 6, ((PyObject *)__pyx_n_s__finished));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__finished));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_146));
  __pyx_k_codeobj_147 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_148, 541, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_147)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":572
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_compare(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */
  __pyx_k_tuple_149 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_149)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_149);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 1, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__operator));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 3, ((PyObject *)__pyx_n_s__operator));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__operator));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__flag));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 7, ((PyObject *)__pyx_n_s__flag));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flag));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 8, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_149));
  __pyx_k_codeobj_150 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__scalar_compare, 572, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_150)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":616
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_compare(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */
  __pyx_k_tuple_151 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_151)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_151);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__operator));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 3, ((PyObject *)__pyx_n_s__operator));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__operator));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__flag));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 7, ((PyObject *)__pyx_n_s__flag));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flag));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 8, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 9, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_151));
  __pyx_k_codeobj_152 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__vec_compare, 616, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_152)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":668
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_binop(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_153 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_153)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_153);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 1, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 6, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_153));
  __pyx_k_codeobj_154 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__scalar_binop, 668, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_154)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":690
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_binop(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(left)
 */
  __pyx_k_tuple_155 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_155);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 6, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 7, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155));
  __pyx_k_codeobj_156 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__vec_binop, 690, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_156)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":717
 * 
 * 
 * def astype_intsafe(ndarray[object] arr, new_dtype):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_157 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_157);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__new_dtype));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 1, ((PyObject *)__pyx_n_s__new_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__new_dtype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 4, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_datelike));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 5, ((PyObject *)__pyx_n_s__is_datelike));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_datelike));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157));
  __pyx_k_codeobj_158 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__astype_intsafe, 717, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_158)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":747
 *     return result
 * 
 * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Utility used in pandas.core.index._ensure_index
 */
  __pyx_k_tuple_159 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_159);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__converted));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 1, ((PyObject *)__pyx_n_s__converted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__converted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 4, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__all_arrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 5, ((PyObject *)__pyx_n_s__all_arrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__all_arrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
  __pyx_k_codeobj_160 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__clean_index_list, 747, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_160)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":778
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def max_len_string_array(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     """ return the maximum size of elements in a 1-dim string array """
 *     cdef:
 */
  __pyx_k_tuple_161 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_161);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 2, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 3, ((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 5, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_161));
  __pyx_k_codeobj_162 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_163, 778, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_162)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":798
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
 *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
 * 
 */
  __pyx_k_tuple_164 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_164)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_164);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nan_rep));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 1, ((PyObject *)__pyx_n_s__nan_rep));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nan_rep));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__replace));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 2, ((PyObject *)__pyx_n_s__replace));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__replace));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 3, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_164));
  __pyx_k_codeobj_165 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_166, 798, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_165)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":813
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer):             # <<<<<<<<<<<<<<
 * 
 *     cdef int N, j, i, ncols
 */
  __pyx_k_tuple_167 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_167)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_167);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data_index));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 1, ((PyObject *)__pyx_n_s__data_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data_index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nlevels));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 2, ((PyObject *)__pyx_n_s__nlevels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nlevels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cols));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 3, ((PyObject *)__pyx_n_s__cols));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cols));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__writer));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 4, ((PyObject *)__pyx_n_s__writer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__writer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 5, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 6, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ncols));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 8, ((PyObject *)__pyx_n_s__ncols));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ncols));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rows));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 9, ((PyObject *)__pyx_n_s__rows));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rows));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 10, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 11, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 12, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_167));
  __pyx_k_codeobj_168 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__write_csv_rows, 813, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_168)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":861
 * 
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef int length = index.shape[0]
 *     cdef int i = 0
 */
  __pyx_k_tuple_169 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_169)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_169);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_169));
  __pyx_k_codeobj_170 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__arrmap, 861, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_170)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":874
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */
  __pyx_k_tuple_171 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_171)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_171);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__list_of_arrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 0, ((PyObject *)__pyx_n_s__list_of_arrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__list_of_arrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nlevels));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 3, ((PyObject *)__pyx_n_s__nlevels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nlevels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 5, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pre));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 6, ((PyObject *)__pyx_n_s__pre));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pre));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 7, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vecs));
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 8, ((PyObject *)__pyx_n_s__vecs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vecs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_171));
  __pyx_k_codeobj_172 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__is_lexsorted, 874, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_172)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":913
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,             # <<<<<<<<<<<<<<
 *                        object closed='left'):
 *     """
 */
  __pyx_k_tuple_173 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_173)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_173);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__binner));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 1, ((PyObject *)__pyx_n_s__binner));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__binner));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__closed));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 2, ((PyObject *)__pyx_n_s__closed));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__closed));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lenidx));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 3, ((PyObject *)__pyx_n_s__lenidx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lenidx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lenbin));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 4, ((PyObject *)__pyx_n_s__lenbin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lenbin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 6, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bc));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 7, ((PyObject *)__pyx_n_s__bc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vc));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 8, ((PyObject *)__pyx_n_s__vc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bins));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 9, ((PyObject *)__pyx_n_s__bins));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bins));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__l_bin));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 10, ((PyObject *)__pyx_n_s__l_bin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l_bin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__r_bin));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 11, ((PyObject *)__pyx_n_s__r_bin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r_bin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_closed));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 12, ((PyObject *)__pyx_n_s__right_closed));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_closed));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173));
  __pyx_k_codeobj_174 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__generate_bins_dt64, 913, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_174)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":962
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def row_bool_subset(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                     ndarray[uint8_t, cast=True] mask):
 *     cdef:
 */
  __pyx_k_tuple_175 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_175)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_175);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 6, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 7, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_175));
  __pyx_k_codeobj_176 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__row_bool_subset, 962, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_176)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":983
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def row_bool_subset_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[uint8_t, cast=True] mask):
 *     cdef:
 */
  __pyx_k_tuple_177 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_177);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 6, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 7, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177));
  __pyx_k_codeobj_178 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s_179, 983, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_178)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1003
 * 
 * 
 * def group_count(ndarray[int64_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_180 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_180)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_180);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__size));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 1, ((PyObject *)__pyx_n_s__size));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 4, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180));
  __pyx_k_codeobj_181 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__group_count, 1003, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_181)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1013
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_182 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_182)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_182);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_182, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapping));
  PyTuple_SET_ITEM(__pyx_k_tuple_182, 1, ((PyObject *)__pyx_n_s__mapping));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapping));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_182, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_182, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_182, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_182));
  __pyx_k_codeobj_183 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__lookup_values, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_183)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1023
 * 
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_k_tuple_184 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_184);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_bin));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 2, ((PyObject *)__pyx_n_s__max_bin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_bin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 5, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
  __pyx_k_codeobj_185 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__count_level_1d, 1023, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_185)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1040
 * 
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_k_tuple_186 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_186);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_bin));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 2, ((PyObject *)__pyx_n_s__max_bin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_bin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 7, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
  __pyx_k_codeobj_187 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__count_level_2d, 1040, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_187)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1071
 * pandas_null = _PandasNull()
 * 
 * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */
  __pyx_k_tuple_188 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_188);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ndarrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 0, ((PyObject *)__pyx_n_s__ndarrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ndarrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 1, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__it));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 7, ((PyObject *)__pyx_n_s__it));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__it));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 9, ((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 10, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
  __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__fast_zip_fillna, 1071, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1118
 *     return result
 * 
 * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_190 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_190);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__take_last));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 1, ((PyObject *)__pyx_n_s__take_last));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__take_last));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 4, ((PyObject *)__pyx_n_s__seen));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 5, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__duplicated, 1118, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1147
 *     return result.view(np.bool_)
 * 
 * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, group_size, n, lab, start
 */
  __pyx_k_tuple_192 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_192);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 0, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ngroups));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 1, ((PyObject *)__pyx_n_s__ngroups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ngroups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__group_size));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 3, ((PyObject *)__pyx_n_s__group_size));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__group_size));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lab));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 5, ((PyObject *)__pyx_n_s__lab));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lab));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 6, ((PyObject *)__pyx_n_s__start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__slobj));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 7, ((PyObject *)__pyx_n_s__slobj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__slobj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__starts));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 8, ((PyObject *)__pyx_n_s__starts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__starts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ends));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 9, ((PyObject *)__pyx_n_s__ends));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ends));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __pyx_k_codeobj_193 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__generate_slices, 1147, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_193)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1172
 * 
 * 
 * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
 *                  list sorted_labels):
 *     cdef:
 */
  __pyx_k_tuple_194 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_194);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__keys));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 2, ((PyObject *)__pyx_n_s__keys));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__keys));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sorted_labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 3, ((PyObject *)__pyx_n_s__sorted_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sorted_labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lab));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 7, ((PyObject *)__pyx_n_s__lab));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lab));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 8, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 9, ((PyObject *)__pyx_n_s__start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 10, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 11, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 12, ((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 13, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
  __pyx_k_codeobj_195 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_101, __pyx_n_s__indices_fast, 1172, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_195)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/reduce.pyx":474
 *     pass
 * 
 * def apply_frame_axis0(object frame, object f, object names,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] starts, ndarray[int64_t] ends):
 *     cdef:
 */
  __pyx_k_tuple_199 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_199)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_199);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__frame));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 0, ((PyObject *)__pyx_n_s__frame));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__frame));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 1, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__names));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 2, ((PyObject *)__pyx_n_s__names));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__names));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__starts));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 3, ((PyObject *)__pyx_n_s__starts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__starts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ends));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 4, ((PyObject *)__pyx_n_s__ends));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ends));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__slider));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 5, ((PyObject *)__pyx_n_s__slider));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__slider));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__results));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 8, ((PyObject *)__pyx_n_s__results));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__results));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__piece));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 9, ((PyObject *)__pyx_n_s__piece));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__piece));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__item_cache));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 10, ((PyObject *)__pyx_n_s__item_cache));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__item_cache));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__chunk));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 11, ((PyObject *)__pyx_n_s__chunk));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chunk));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__shape_before));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 12, ((PyObject *)__pyx_n_s__shape_before));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__shape_before));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 13, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mutated));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 14, ((PyObject *)__pyx_n_s__mutated));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mutated));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__gin));
  PyTuple_SET_ITEM(__pyx_k_tuple_199, 15, ((PyObject *)__pyx_n_s__gin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gin));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_199));
  __pyx_k_codeobj_200 = (PyObject*)__Pyx_PyCode_New(5, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_201, __pyx_n_s__apply_frame_axis0, 474, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/reduce.pyx":591
 * 
 * 
 * def reduce(arr, f, axis=0, dummy=None, labels=None):             # <<<<<<<<<<<<<<
 *     if labels._has_complex_internals:
 *         raise Exception('Cannot use shortcut')
 */
  __pyx_k_tuple_202 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_202);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 1, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__axis));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 2, ((PyObject *)__pyx_n_s__axis));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__axis));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dummy));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 3, ((PyObject *)__pyx_n_s__dummy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 4, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__reducer));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 5, ((PyObject *)__pyx_n_s__reducer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__reducer));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202));
  __pyx_k_codeobj_203 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_201, __pyx_n_s__reduce, 591, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":33
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_204 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_204)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_204);
  __Pyx_INCREF(((PyObject *)__pyx_n_s___values));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 0, ((PyObject *)__pyx_n_s___values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 4, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val_kind));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 5, ((PyObject *)__pyx_n_s__val_kind));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val_kind));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_204));
  __pyx_k_codeobj_205 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__infer_dtype, 33, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_205)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":133
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_206 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_206)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_206);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_206));
  __pyx_k_codeobj_207 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__infer_dtype_list, 133, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_207)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":154
 *     return PyDelta_Check(o) or util.is_timedelta64_object(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_208 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_208);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208));
  __pyx_k_codeobj_209 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_bool_array, 154, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_209)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":175
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_k_tuple_210 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_210)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_210);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__o));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 0, ((PyObject *)__pyx_n_s__o));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__o));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_210));
  __pyx_k_codeobj_211 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_integer, 175, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_211)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":178
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_212 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_212)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_212);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_212));
  __pyx_k_codeobj_213 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_integer_array, 178, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_213)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":199
 *         return False
 * 
 * def is_integer_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_214 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_214);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214));
  __pyx_k_codeobj_215 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_51, 199, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_215)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":222
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_216 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_216);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216));
  __pyx_k_codeobj_217 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_float_array, 222, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_217)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":243
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_218 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_218)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_218);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_218));
  __pyx_k_codeobj_219 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_string_array, 243, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_219)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":264
 *         return False
 * 
 * def is_unicode_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_220 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_220);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220));
  __pyx_k_codeobj_221 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_unicode_array, 264, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_221)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":286
 * 
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_k_tuple_222 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_222)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_222);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_222, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_222, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_222, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_222, 3, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_222));
  __pyx_k_codeobj_223 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_datetime_array, 286, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_223)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":298
 * 
 * 
 * def is_datetime64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_k_tuple_224 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_224)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_224);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_224, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_224, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_224, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_224, 3, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_224));
  __pyx_k_codeobj_225 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_datetime64_array, 298, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_225)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":309
 *     return True
 * 
 * def is_timedelta_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_k_tuple_226 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_226)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_226);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_226, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_226, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_226, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_226, 3, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_226));
  __pyx_k_codeobj_227 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_timedelta_array, 309, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_227)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":320
 *     return True
 * 
 * def is_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_k_tuple_228 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_228)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_228);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_228, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_228, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_228, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_228, 3, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_228));
  __pyx_k_codeobj_229 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_230, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_229)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":331
 *     return True
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     """ infer with timedeltas and/or nat/none """
 *     cdef int i, n = len(values)
 */
  __pyx_k_tuple_231 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_231)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_231);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_231, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_231, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_231, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_231, 3, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_231));
  __pyx_k_codeobj_232 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_50, 331, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_232)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":343
 *     return True
 * 
 * def is_date_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_233 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_233)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_233);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_233));
  __pyx_k_codeobj_234 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_date_array, 343, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_234)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":352
 *     return True
 * 
 * def is_time_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_235 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_235)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_235);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_235));
  __pyx_k_codeobj_236 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_time_array, 352, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_236)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":361
 *     return True
 * 
 * def is_period(object o):             # <<<<<<<<<<<<<<
 *     from pandas import Period
 *     return isinstance(o,Period)
 */
  __pyx_k_tuple_237 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_237)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_237);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__o));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 0, ((PyObject *)__pyx_n_s__o));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__o));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Period));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 1, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_237));
  __pyx_k_codeobj_238 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_period, 361, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_238)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":365
 *     return isinstance(o,Period)
 * 
 * def is_period_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     from pandas.tseries.period import Period
 */
  __pyx_k_tuple_239 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_239)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_239);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Period));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 3, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_239));
  __pyx_k_codeobj_240 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__is_period_array, 365, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_240)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":383
 * cdef double fINT64_MIN = <double> INT64_MIN
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                           convert_empty=True, coerce_numeric=False):
 *     '''
 */
  __pyx_k_tuple_241 = PyTuple_New(15); if (unlikely(!__pyx_k_tuple_241)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_241);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 1, ((PyObject *)__pyx_n_s__na_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__convert_empty));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 2, ((PyObject *)__pyx_n_s__convert_empty));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__convert_empty));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__coerce_numeric));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 3, ((PyObject *)__pyx_n_s__coerce_numeric));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__coerce_numeric));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__status));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 4, ((PyObject *)__pyx_n_s__status));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__status));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__floats));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 7, ((PyObject *)__pyx_n_s__floats));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__floats));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__complexes));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 8, ((PyObject *)__pyx_n_s__complexes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complexes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ints));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 9, ((PyObject *)__pyx_n_s__ints));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ints));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_float));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 10, ((PyObject *)__pyx_n_s__seen_float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_float));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_complex));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 11, ((PyObject *)__pyx_n_s__seen_complex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_complex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 12, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fval));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 13, ((PyObject *)__pyx_n_s__fval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_int));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 14, ((PyObject *)__pyx_n_s__seen_int));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_int));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_241));
  __pyx_k_codeobj_242 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_243, 383, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_242)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":461
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0, bint convert_datetime=0, bint convert_timedelta=0):
 *     '''
 */
  __pyx_k_tuple_244 = PyTuple_New(28); if (unlikely(!__pyx_k_tuple_244)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_244);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objects));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 0, ((PyObject *)__pyx_n_s__objects));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objects));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__try_float));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 1, ((PyObject *)__pyx_n_s__try_float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__try_float));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__safe));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 2, ((PyObject *)__pyx_n_s__safe));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__safe));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__convert_datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 3, ((PyObject *)__pyx_n_s__convert_datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__convert_datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__convert_timedelta));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 4, ((PyObject *)__pyx_n_s__convert_timedelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__convert_timedelta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__floats));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 7, ((PyObject *)__pyx_n_s__floats));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__floats));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__complexes));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 8, ((PyObject *)__pyx_n_s__complexes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complexes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ints));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 9, ((PyObject *)__pyx_n_s__ints));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ints));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bools));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 10, ((PyObject *)__pyx_n_s__bools));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bools));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idatetimes));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 11, ((PyObject *)__pyx_n_s__idatetimes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idatetimes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__itimedeltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 12, ((PyObject *)__pyx_n_s__itimedeltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__itimedeltas));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_float));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 13, ((PyObject *)__pyx_n_s__seen_float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_float));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_complex));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 14, ((PyObject *)__pyx_n_s__seen_complex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_complex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 15, ((PyObject *)__pyx_n_s__seen_datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_timedelta));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 16, ((PyObject *)__pyx_n_s__seen_timedelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_timedelta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_int));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 17, ((PyObject *)__pyx_n_s__seen_int));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_int));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_bool));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 18, ((PyObject *)__pyx_n_s__seen_bool));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_bool));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_object));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 19, ((PyObject *)__pyx_n_s__seen_object));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_object));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_null));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 20, ((PyObject *)__pyx_n_s__seen_null));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_null));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_numeric));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 21, ((PyObject *)__pyx_n_s__seen_numeric));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_numeric));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 22, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__onan));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 23, ((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__onan));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fval));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 24, ((PyObject *)__pyx_n_s__fval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fnan));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 25, ((PyObject *)__pyx_n_s__fnan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fnan));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetimes));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 26, ((PyObject *)__pyx_n_s__datetimes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetimes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timedeltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 27, ((PyObject *)__pyx_n_s__timedeltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedeltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_244));
  __pyx_k_codeobj_245 = (PyObject*)__Pyx_PyCode_New(5, 0, 28, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_12, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_245)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":626
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_k_tuple_246 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_246)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_246);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_246, 0, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_246));
  __pyx_k_codeobj_247 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__convert_sql_column, 626, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_247)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":629
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,             # <<<<<<<<<<<<<<
 *                     dayfirst=False,default=None):
 *     cdef:
 */
  __pyx_k_tuple_248 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_248)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_248);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 1, ((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dayfirst));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 2, ((PyObject *)__pyx_n_s__dayfirst));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dayfirst));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__default));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 3, ((PyObject *)__pyx_n_s__default));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__default));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 7, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 8, ((PyObject *)__pyx_n_s__parse));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 9, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_248, 10, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_248));
  __pyx_k_codeobj_249 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__try_parse_dates, 629, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_249)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":677
 *     return result
 * 
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,             # <<<<<<<<<<<<<<
 *                             date_parser=None, time_parser=None,
 *                             dayfirst=False,default=None):
 */
  __pyx_k_tuple_250 = PyTuple_New(20); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_250);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dates));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 0, ((PyObject *)__pyx_n_s__dates));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dates));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__times));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 1, ((PyObject *)__pyx_n_s__times));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__times));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date_parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 2, ((PyObject *)__pyx_n_s__date_parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date_parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__time_parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 3, ((PyObject *)__pyx_n_s__time_parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time_parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dayfirst));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 4, ((PyObject *)__pyx_n_s__dayfirst));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dayfirst));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__default));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 5, ((PyObject *)__pyx_n_s__default));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__default));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 9, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__time));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 10, ((PyObject *)__pyx_n_s__time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 11, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 12, ((PyObject *)__pyx_n_s__timedelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 13, ((PyObject *)__pyx_n_s__parse));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 14, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 15, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_time));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 16, ((PyObject *)__pyx_n_s__parse_time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_time));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 17, ((PyObject *)__pyx_n_s__parse_time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 18, ((PyObject *)__pyx_n_s__d));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__t));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 19, ((PyObject *)__pyx_n_s__t));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__t));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250));
  __pyx_k_codeobj_251 = (PyObject*)__Pyx_PyCode_New(6, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_252, 677, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_251)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":731
 * 
 * 
 * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months,             # <<<<<<<<<<<<<<
 *                              ndarray[object] days):
 *     cdef:
 */
  __pyx_k_tuple_253 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_253)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_253);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__years));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 0, ((PyObject *)__pyx_n_s__years));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__years));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__months));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 1, ((PyObject *)__pyx_n_s__months));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__months));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__days));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 2, ((PyObject *)__pyx_n_s__days));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_253, 6, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_253));
  __pyx_k_codeobj_254 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_255, 731, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_254)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":749
 *     return result
 * 
 * def try_parse_datetime_components(ndarray[object] years,             # <<<<<<<<<<<<<<
 *                                   ndarray[object] months,
 *                                   ndarray[object] days,
 */
  __pyx_k_tuple_256 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_256);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__years));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 0, ((PyObject *)__pyx_n_s__years));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__years));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__months));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 1, ((PyObject *)__pyx_n_s__months));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__months));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__days));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 2, ((PyObject *)__pyx_n_s__days));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 3, ((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hours));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minutes));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 4, ((PyObject *)__pyx_n_s__minutes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minutes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 5, ((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__secs));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 9, ((PyObject *)__pyx_n_s__secs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__secs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__float_secs));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 10, ((PyObject *)__pyx_n_s__float_secs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float_secs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__micros));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 11, ((PyObject *)__pyx_n_s__micros));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__micros));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 12, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256));
  __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_258, 749, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":785
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                      convert_empty=True):
 *     cdef:
 */
  __pyx_k_tuple_259 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_259)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_259);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 1, ((PyObject *)__pyx_n_s__na_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__convert_empty));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 2, ((PyObject *)__pyx_n_s__convert_empty));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__convert_empty));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__onan));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 6, ((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__onan));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 7, ((PyObject *)__pyx_n_s__na_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__memo));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 8, ((PyObject *)__pyx_n_s__memo));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__memo));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_259));
  __pyx_k_codeobj_260 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__sanitize_objects, 785, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_260)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":808
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr,             # <<<<<<<<<<<<<<
 *                        true_values=None, false_values=None):
 *     cdef:
 */
  __pyx_k_tuple_261 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_261)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_261);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__true_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 1, ((PyObject *)__pyx_n_s__true_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__true_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__false_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 2, ((PyObject *)__pyx_n_s__false_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__false_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__true_vals));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 7, ((PyObject *)__pyx_n_s__true_vals));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__true_vals));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__false_vals));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 8, ((PyObject *)__pyx_n_s__false_vals));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__false_vals));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 9, ((PyObject *)__pyx_n_s__na_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 10, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_261));
  __pyx_k_codeobj_262 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__maybe_convert_bool, 808, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_262)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":857
 * 
 * 
 * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask,             # <<<<<<<<<<<<<<
 *                    bint convert=1):
 *     '''
 */
  __pyx_k_tuple_263 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_263)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_263);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 1, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 2, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__convert));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 3, ((PyObject *)__pyx_n_s__convert));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__convert));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 7, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_263));
  __pyx_k_codeobj_264 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__map_infer_mask, 857, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_264)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":899
 *     return result
 * 
 * def map_infer(ndarray arr, object f, bint convert=1):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_k_tuple_265 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_265);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 1, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__convert));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 2, ((PyObject *)__pyx_n_s__convert));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__convert));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265));
  __pyx_k_codeobj_266 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__map_infer, 899, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_266)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":938
 * 
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_267 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_267);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rows));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 0, ((PyObject *)__pyx_n_s__rows));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rows));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 5, ((PyObject *)__pyx_n_s__tmp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 7, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267));
  __pyx_k_codeobj_268 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__to_object_array, 938, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_268)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":962
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_269 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_269)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_269);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tuples));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 0, ((PyObject *)__pyx_n_s__tuples));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tuples));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 5, ((PyObject *)__pyx_n_s__tmp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 7, ((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_269));
  __pyx_k_codeobj_270 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_271, 962, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_270)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":978
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_272 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_272)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_272);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rows));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 0, ((PyObject *)__pyx_n_s__rows));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rows));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 5, ((PyObject *)__pyx_n_s__tmp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 7, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_272));
  __pyx_k_codeobj_273 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s_274, 978, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_273)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":1009
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_k_tuple_275 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_275)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_275);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapping));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 0, ((PyObject *)__pyx_n_s__mapping));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapping));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__keys));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 1, ((PyObject *)__pyx_n_s__keys));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__keys));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__default));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 2, ((PyObject *)__pyx_n_s__default));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__default));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 6, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_275));
  __pyx_k_codeobj_276 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__fast_multiget, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_276)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_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;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initlib(void); /*proto*/
PyMODINIT_FUNC initlib(void)
#else
PyMODINIT_FUNC PyInit_lib(void); /*proto*/
PyMODINIT_FUNC PyInit_lib(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  double __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_lib(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("lib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "pandas.lib")) {
      if (unlikely(PyDict_SetItemString(modules, "pandas.lib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  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__lib) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_6pandas_3lib__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "_PandasNull", (PyObject *)&__pyx_type_6pandas_3lib__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib__PandasNull = &__pyx_type_6pandas_3lib__PandasNull;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_Reducer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Reducer", (PyObject *)&__pyx_type_6pandas_3lib_Reducer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_Reducer = &__pyx_type_6pandas_3lib_Reducer;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "SeriesBinGrouper", (PyObject *)&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_SeriesBinGrouper = &__pyx_type_6pandas_3lib_SeriesBinGrouper;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "SeriesGrouper", (PyObject *)&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_SeriesGrouper = &__pyx_type_6pandas_3lib_SeriesGrouper;
  __pyx_vtabptr_6pandas_3lib_Slider = &__pyx_vtable_6pandas_3lib_Slider;
  __pyx_vtable_6pandas_3lib_Slider.advance = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_advance;
  __pyx_vtable_6pandas_3lib_Slider.move = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, int, int))__pyx_f_6pandas_3lib_6Slider_move;
  __pyx_vtable_6pandas_3lib_Slider.set_length = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_set_length;
  __pyx_vtable_6pandas_3lib_Slider.reset = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_reset;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_3lib_Slider.tp_dict, __pyx_vtabptr_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Slider", (PyObject *)&__pyx_type_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_Slider = &__pyx_type_6pandas_3lib_Slider;
  __pyx_vtabptr_6pandas_3lib_BlockSlider = &__pyx_vtable_6pandas_3lib_BlockSlider;
  __pyx_vtable_6pandas_3lib_BlockSlider.move = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_BlockSlider *, int, int, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_11BlockSlider_move;
  __pyx_vtable_6pandas_3lib_BlockSlider.reset = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_BlockSlider *))__pyx_f_6pandas_3lib_11BlockSlider_reset;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_3lib_BlockSlider.tp_dict, __pyx_vtabptr_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "BlockSlider", (PyObject *)&__pyx_type_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_BlockSlider = &__pyx_type_6pandas_3lib_BlockSlider;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "cache_readonly", (PyObject *)&__pyx_type_6pandas_3lib_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_cache_readonly = &__pyx_type_6pandas_3lib_cache_readonly;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "AxisProperty", (PyObject *)&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_AxisProperty = &__pyx_type_6pandas_3lib_AxisProperty;
  if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = &__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates;
  if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = &__pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time;
  /*--- 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[5]; __pyx_lineno = 157; __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[5]; __pyx_lineno = 167; __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[5]; __pyx_lineno = 171; __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[5]; __pyx_lineno = 180; __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[5]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __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[8]; __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[9]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("pandas.tslib"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_1, "convert_to_tsobject", (void (**)(void))&__pyx_f_6pandas_5tslib_convert_to_tsobject, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_1, "convert_to_timedelta64", (void (**)(void))&__pyx_f_6pandas_5tslib_convert_to_timedelta64, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  /*--- Execution code ---*/

  /* "pandas/lib.pyx":3
 * cimport numpy as np
 * cimport cython
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * from numpy cimport *
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __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[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":24
 * cimport cpython
 * 
 * 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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__isnan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnan, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/lib.pyx":25
 * 
 * isnan = np.isnan
 * cdef double NaN = <double> np.NaN             # <<<<<<<<<<<<<<
 * cdef double nan = NaN
 * cdef double NAN = nan
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_6pandas_3lib_NaN = ((double)__pyx_t_4);

  /* "pandas/lib.pyx":26
 * isnan = np.isnan
 * cdef double NaN = <double> np.NaN
 * cdef double nan = NaN             # <<<<<<<<<<<<<<
 * cdef double NAN = nan
 * 
 */
  __pyx_v_6pandas_3lib_nan = __pyx_v_6pandas_3lib_NaN;

  /* "pandas/lib.pyx":27
 * cdef double NaN = <double> np.NaN
 * cdef double nan = NaN
 * cdef double NAN = nan             # <<<<<<<<<<<<<<
 * 
 * from datetime import datetime as pydatetime
 */
  __pyx_v_6pandas_3lib_NAN = __pyx_v_6pandas_3lib_nan;

  /* "pandas/lib.pyx":29
 * cdef double NAN = nan
 * 
 * from datetime import datetime as pydatetime             # <<<<<<<<<<<<<<
 * 
 * # this is our tseries.pxd
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_2, 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_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pydatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __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;

  /* "pandas/lib.pyx":35
 * 
 * from tslib cimport convert_to_tsobject, convert_to_timedelta64
 * import tslib             # <<<<<<<<<<<<<<
 * from tslib import NaT, Timestamp, repr_timedelta64
 * 
 */
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__tslib), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tslib, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/lib.pyx":36
 * from tslib cimport convert_to_tsobject, convert_to_timedelta64
 * import tslib
 * from tslib import NaT, Timestamp, repr_timedelta64             # <<<<<<<<<<<<<<
 * 
 * cdef int64_t NPY_NAT = util.get_nat()
 */
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__NaT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NaT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Timestamp));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__Timestamp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Timestamp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__repr_timedelta64));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__repr_timedelta64));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__repr_timedelta64));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__tslib), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __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 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__NaT);
  if (__pyx_t_3 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__NaT);
    if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Timestamp);
  if (__pyx_t_3 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Timestamp);
    if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Timestamp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__repr_timedelta64);
  if (__pyx_t_3 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__repr_timedelta64);
    if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__repr_timedelta64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":38
 * from tslib import NaT, Timestamp, repr_timedelta64
 * 
 * cdef int64_t NPY_NAT = util.get_nat()             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned char UChar
 */
  __pyx_v_6pandas_3lib_NPY_NAT = get_nat();

  /* "pandas/lib.pyx":56
 * 
 * # import datetime C API
 * PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # initialize numpy
 */
  PyDateTime_IMPORT;

  /* "pandas/lib.pyx":59
 * 
 * # initialize numpy
 * import_array()             # <<<<<<<<<<<<<<
 * import_ufunc()
 * 
 */
  import_array();

  /* "pandas/lib.pyx":60
 * # initialize numpy
 * import_array()
 * import_ufunc()             # <<<<<<<<<<<<<<
 * 
 * cpdef map_indices_list(list index):
 */
  import_ufunc();

  /* "pandas/lib.pyx":85
 * from libc.stdlib cimport malloc, free
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_3ismember, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __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 = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":117
 * # datetime / io related
 * 
 * cdef int _EPOCH_ORD = 719163             # <<<<<<<<<<<<<<
 * 
 * from datetime import date as pydate
 */
  __pyx_v_6pandas_3lib__EPOCH_ORD = 719163;

  /* "pandas/lib.pyx":119
 * 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 = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__date);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__date);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __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 = 119; __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;

  /* "pandas/lib.pyx":140
 *     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_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_9array_to_timestamp, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__array_to_timestamp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/lib.pyx":152
 *     return result
 * 
 * def time64_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[object, ndim=1] result
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_11time64_to_datetime, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time64_to_datetime, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/lib.pyx":170
 * # isnull / notnull related
 * 
 * cdef double INF = <double> np.inf             # <<<<<<<<<<<<<<
 * cdef double NEGINF = -INF
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__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_v_6pandas_3lib_INF = ((double)__pyx_t_4);

  /* "pandas/lib.pyx":171
 * 
 * cdef double INF = <double> np.inf
 * cdef double NEGINF = -INF             # <<<<<<<<<<<<<<
 * 
 * cpdef checknull(object val):
 */
  __pyx_v_6pandas_3lib_NEGINF = (-__pyx_v_6pandas_3lib_INF);

  /* "pandas/lib.pyx":201
 *         return util._checknull(val)
 * 
 * def isscalar(object val):             # <<<<<<<<<<<<<<
 *     return np.isscalar(val) or val is None or PyDateTime_Check(val)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_17isscalar, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isscalar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":207
 * @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_3lib_19isnullobj, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":221
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj_old(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_21isnullobj_old, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnullobj_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":235
 * @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_3lib_23isnullobj2d, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __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 = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":251
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj_old(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_25isnullobj_old, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnullobj_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":265
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj2d_old(ndarray[object, ndim=2] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, n, m
 *     cdef object val
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_27isnullobj2d_old, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnullobj2d_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":279
 *     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_3lib_29list_to_object_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_48, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":299
 * @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_3lib_31fast_unique, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __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 = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":320
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[object] buf
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_33fast_unique_multiple, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_124, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":346
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list(list lists):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_35fast_unique_multiple_list, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_127, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":372
 * @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_3lib_37fast_unique_multiple_list_gen, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_130, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":397
 * @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_3lib_39dicts_to_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __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 = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":420
 *     return result
 * 
 * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_41fast_zip, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __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 = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":461
 *     return result
 * 
 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_43get_reverse_indexer, NULL, __pyx_n_s_63); 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__get_reverse_indexer, __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/lib.pyx":477
 * 
 * 
 * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_45has_infs_f4, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __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 = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":491
 *     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_3lib_47has_infs_f8, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __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 = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":505
 *     return False
 * 
 * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object val, f, result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_49convert_timestamps, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __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 = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":528
 *     return out
 * 
 * def maybe_indices_to_slice(ndarray[int64_t] indices):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indices)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_51maybe_indices_to_slice, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_145, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":541
 * 
 * 
 * def maybe_booleans_to_slice(ndarray[uint8_t] mask):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(mask)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_53maybe_booleans_to_slice, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_148, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":572
 * @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_3lib_55scalar_compare, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __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 = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":616
 * @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_3lib_57vec_compare, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __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 = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":668
 * @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_3lib_59scalar_binop, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __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 = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":690
 * @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_3lib_61vec_binop, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":717
 * 
 * 
 * def astype_intsafe(ndarray[object] arr, new_dtype):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_63astype_intsafe, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__astype_intsafe, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":747
 *     return result
 * 
 * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Utility used in pandas.core.index._ensure_index
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_67clean_index_list, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__clean_index_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":778
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def max_len_string_array(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     """ return the maximum size of elements in a 1-dim string array """
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_69max_len_string_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_163, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":798
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
 *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_166, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":813
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer):             # <<<<<<<<<<<<<<
 * 
 *     cdef int N, j, i, ncols
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_73write_csv_rows, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__write_csv_rows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":861
 * 
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef int length = index.shape[0]
 *     cdef int i = 0
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_75arrmap, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":874
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_77is_lexsorted, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_lexsorted, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":913
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,             # <<<<<<<<<<<<<<
 *                        object closed='left'):
 *     """
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_79generate_bins_dt64, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__generate_bins_dt64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":962
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def row_bool_subset(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                     ndarray[uint8_t, cast=True] mask):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_81row_bool_subset, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__row_bool_subset, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":983
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def row_bool_subset_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[uint8_t, cast=True] mask):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_83row_bool_subset_object, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_179, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1003
 * 
 * 
 * def group_count(ndarray[int64_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_85group_count, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__group_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1013
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_87lookup_values, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__lookup_values, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1023
 * 
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_89count_level_1d, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__count_level_1d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1040
 * 
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_91count_level_2d, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__count_level_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1069
 *         return 0
 * 
 * pandas_null = _PandasNull()             # <<<<<<<<<<<<<<
 * 
 * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):
 */
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pandas_null, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1071
 * pandas_null = _PandasNull()
 * 
 * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__pandas_null); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_19 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_93fast_zip_fillna, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fast_zip_fillna, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1118
 *     return result
 * 
 * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_21 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_95duplicated, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__duplicated, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1147
 *     return result.view(np.bool_)
 * 
 * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, group_size, n, lab, start
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_97generate_slices, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__generate_slices, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1172
 * 
 * 
 * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
 *                  list sorted_labels):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_99indices_fast, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__indices_fast, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":3
 * #cython=False
 * from numpy cimport *
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * from distutils.version import LooseVersion
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __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[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":5
 * import numpy as np
 * 
 * from distutils.version import LooseVersion             # <<<<<<<<<<<<<<
 * 
 * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2'
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__LooseVersion));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__LooseVersion));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LooseVersion));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_196), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__LooseVersion);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__LooseVersion);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__LooseVersion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __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;

  /* "pandas/src/reduce.pyx":7
 * from distutils.version import LooseVersion
 * 
 * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2'             # <<<<<<<<<<<<<<
 * 
 * cdef class Reducer:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____version__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __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_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_197), Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_198, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":471
 * 
 * 
 * class InvalidApply(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2), __pyx_n_s__InvalidApply, __pyx_n_s_63); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__InvalidApply, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":474
 *     pass
 * 
 * def apply_frame_axis0(object frame, object f, object names,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] starts, ndarray[int64_t] ends):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_101apply_frame_axis0, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__apply_frame_axis0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":591
 * 
 * 
 * def reduce(arr, f, axis=0, dummy=None, labels=None):             # <<<<<<<<<<<<<<
 *     if labels._has_complex_internals:
 *         raise Exception('Cannot use shortcut')
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_103reduce, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__reduce, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/properties.pyx":9
 *         object func, name, allow_setting
 * 
 *     def __init__(self, func=None, allow_setting=False):             # <<<<<<<<<<<<<<
 *         if func is not None:
 *             self.func = func
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_46 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":2
 * cimport util
 * from tslib import NaT             # <<<<<<<<<<<<<<
 * from datetime import datetime, timedelta
 * iNaT = util.get_nat()
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__NaT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NaT));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__tslib), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__NaT);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__NaT);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __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;

  /* "pandas/src/inference.pyx":3
 * cimport util
 * from tslib import NaT
 * from datetime import datetime, timedelta             # <<<<<<<<<<<<<<
 * iNaT = util.get_nat()
 * 
 */
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__timedelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":4
 * from tslib import NaT
 * from datetime import datetime, timedelta
 * iNaT = util.get_nat()             # <<<<<<<<<<<<<<
 * 
 * _TYPE_MAP = {
 */
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(get_nat()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__iNaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":6
 * iNaT = util.get_nat()
 * 
 * _TYPE_MAP = {             # <<<<<<<<<<<<<<
 *     np.int8: 'integer',
 *     np.int16: 'integer',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "pandas/src/inference.pyx":7
 * 
 * _TYPE_MAP = {
 *     np.int8: 'integer',             # <<<<<<<<<<<<<<
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":8
 * _TYPE_MAP = {
 *     np.int8: 'integer',
 *     np.int16: 'integer',             # <<<<<<<<<<<<<<
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":9
 *     np.int8: 'integer',
 *     np.int16: 'integer',
 *     np.int32: 'integer',             # <<<<<<<<<<<<<<
 *     np.int64: 'integer',
 *     np.uint8: 'integer',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __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[1]; __pyx_lineno = 9; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":10
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 *     np.int64: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":11
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 *     np.uint8: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __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[1]; __pyx_lineno = 11; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":12
 *     np.int64: 'integer',
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":13
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint64: 'integer',
 *     np.float32: 'floating',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__uint32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":14
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',             # <<<<<<<<<<<<<<
 *     np.float32: 'floating',
 *     np.float64: 'floating',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":15
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',
 *     np.float32: 'floating',             # <<<<<<<<<<<<<<
 *     np.float64: 'floating',
 *     np.complex128: 'complex',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":16
 *     np.uint64: 'integer',
 *     np.float32: 'floating',
 *     np.float64: 'floating',             # <<<<<<<<<<<<<<
 *     np.complex128: 'complex',
 *     np.complex128: 'complex',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":17
 *     np.float32: 'floating',
 *     np.float64: 'floating',
 *     np.complex128: 'complex',             # <<<<<<<<<<<<<<
 *     np.complex128: 'complex',
 *     np.string_: 'string',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__complex128); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":18
 *     np.float64: 'floating',
 *     np.complex128: 'complex',
 *     np.complex128: 'complex',             # <<<<<<<<<<<<<<
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__complex128); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":19
 *     np.complex128: 'complex',
 *     np.complex128: 'complex',
 *     np.string_: 'string',             # <<<<<<<<<<<<<<
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean',
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__string_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__string)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":20
 *     np.complex128: 'complex',
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',             # <<<<<<<<<<<<<<
 *     np.bool_: 'boolean',
 *     np.datetime64 : 'datetime64',
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__unicode)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":21
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean',             # <<<<<<<<<<<<<<
 *     np.datetime64 : 'datetime64',
 *     np.timedelta64 : 'timedelta64'
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__bool_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__boolean)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":22
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean',
 *     np.datetime64 : 'datetime64',             # <<<<<<<<<<<<<<
 *     np.timedelta64 : 'timedelta64'
 * }
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__datetime64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":23
 *     np.bool_: 'boolean',
 *     np.datetime64 : 'datetime64',
 *     np.timedelta64 : 'timedelta64'             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __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_2, __pyx_t_5, ((PyObject *)__pyx_n_s__timedelta64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___TYPE_MAP, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":26
 * }
 * 
 * try:             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pandas/src/inference.pyx":27
 * 
 * try:
 *     _TYPE_MAP[np.float128] = 'floating'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__float128); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyObject_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pandas/src/inference.pyx":28
 * try:
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.float16] = 'floating'
 * except AttributeError:
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__complex256); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyObject_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/src/inference.pyx":29
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'             # <<<<<<<<<<<<<<
 * 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 = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyObject_SetItem(__pyx_t_5, __pyx_t_2, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":30
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'
 * except AttributeError:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_9) {
      PyErr_Restore(0,0,0);
      goto __pyx_L3_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L9_try_end:;
  }

  /* "pandas/src/inference.pyx":33
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_105infer_dtype, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__infer_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":133
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_107infer_dtype_list, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__infer_dtype_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":154
 *     return PyDelta_Check(o) or util.is_timedelta64_object(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_109is_bool_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_bool_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":175
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_111is_integer, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_integer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":178
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_113is_integer_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_integer_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":199
 *         return False
 * 
 * def is_integer_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_115is_integer_float_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_51, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":222
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_117is_float_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_float_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":243
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_119is_string_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_string_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":264
 *         return False
 * 
 * def is_unicode_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_121is_unicode_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_unicode_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":286
 * 
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_123is_datetime_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_datetime_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":298
 * 
 * 
 * def is_datetime64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_125is_datetime64_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_datetime64_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":309
 *     return True
 * 
 * def is_timedelta_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_127is_timedelta_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_timedelta_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":320
 *     return True
 * 
 * def is_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     cdef object v
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_129is_timedelta64_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_230, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":331
 *     return True
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     """ infer with timedeltas and/or nat/none """
 *     cdef int i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_131is_timedelta_or_timedelta64_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_50, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":343
 *     return True
 * 
 * def is_date_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_133is_date_array, NULL, __pyx_n_s_63); 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);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_date_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":352
 *     return True
 * 
 * def is_time_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_135is_time_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_time_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":361
 *     return True
 * 
 * def is_period(object o):             # <<<<<<<<<<<<<<
 *     from pandas import Period
 *     return isinstance(o,Period)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_137is_period, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_period, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":365
 *     return isinstance(o,Period)
 * 
 * def is_period_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     from pandas.tseries.period import Period
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_139is_period_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_period_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":380
 *     inline int floatify(object, double *result) except -1
 * 
 * cdef double fINT64_MAX = <double> INT64_MAX             # <<<<<<<<<<<<<<
 * cdef double fINT64_MIN = <double> INT64_MIN
 * 
 */
  __pyx_v_6pandas_3lib_fINT64_MAX = ((double)INT64_MAX);

  /* "pandas/src/inference.pyx":381
 * 
 * cdef double fINT64_MAX = <double> INT64_MAX
 * cdef double fINT64_MIN = <double> INT64_MIN             # <<<<<<<<<<<<<<
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values,
 */
  __pyx_v_6pandas_3lib_fINT64_MIN = ((double)INT64_MIN);

  /* "pandas/src/inference.pyx":384
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values,
 *                           convert_empty=True, coerce_numeric=False):             # <<<<<<<<<<<<<<
 *     '''
 *     Type inference function-- convert strings to numeric (potentially) and
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_55 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_56 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":383
 * cdef double fINT64_MIN = <double> INT64_MIN
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                           convert_empty=True, coerce_numeric=False):
 *     '''
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_141maybe_convert_numeric, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_243, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":461
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0, bint convert_datetime=0, bint convert_timedelta=0):
 *     '''
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_143maybe_convert_objects, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_12, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":626
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_145convert_sql_column, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_sql_column, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":630
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,
 *                     dayfirst=False,default=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_60 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":629
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,             # <<<<<<<<<<<<<<
 *                     dayfirst=False,default=None):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_147try_parse_dates, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__try_parse_dates, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":679
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,
 *                             date_parser=None, time_parser=None,
 *                             dayfirst=False,default=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_68 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":677
 *     return result
 * 
 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times,             # <<<<<<<<<<<<<<
 *                             date_parser=None, time_parser=None,
 *                             dayfirst=False,default=None):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_149try_parse_date_and_time, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_252, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":731
 * 
 * 
 * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months,             # <<<<<<<<<<<<<<
 *                              ndarray[object] days):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_151try_parse_year_month_day, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_255, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":749
 *     return result
 * 
 * def try_parse_datetime_components(ndarray[object] years,             # <<<<<<<<<<<<<<
 *                                   ndarray[object] months,
 *                                   ndarray[object] days,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_153try_parse_datetime_components, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_258, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":786
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,
 *                      convert_empty=True):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_80 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":785
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                      convert_empty=True):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_155sanitize_objects, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sanitize_objects, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":808
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr,             # <<<<<<<<<<<<<<
 *                        true_values=None, false_values=None):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_157maybe_convert_bool, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__maybe_convert_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":857
 * 
 * 
 * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask,             # <<<<<<<<<<<<<<
 *                    bint convert=1):
 *     '''
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_159map_infer_mask, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__map_infer_mask, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":899
 *     return result
 * 
 * def map_infer(ndarray arr, object f, bint convert=1):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_161map_infer, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__map_infer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":938
 * 
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_163to_object_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__to_object_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":962
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_165tuples_to_object_array, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_271, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":978
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_167to_object_array_tuples, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_274, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":1009
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k_81 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_169fast_multiget, NULL, __pyx_n_s_63); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __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 = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/lib.pyx":1
 * cimport numpy as np             # <<<<<<<<<<<<<<
 * cimport cython
 * import numpy as np
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "util.pxd":84
 *         return False
 * 
 * cdef inline bint _checknan(object val):             # <<<<<<<<<<<<<<
 *     return not cnp.PyArray_Check(val) and val != val
 */
  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_5);
  if (__pyx_m) {
    __Pyx_AddTraceback("init pandas.lib", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pandas.lib");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static 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_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(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;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    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 CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
  unsigned int n = 1;
  return *(unsigned char*)(&n) != 0;
}
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t < '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1) /* First char was not a digit */
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __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 %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count; /* Consume from buffer string */
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break; /* breaks both loops as ctx->enc_count == 0 */
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue; /* empty struct */
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static CYTHON_INLINE PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        if (isspace(*ts))
            continue;
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
                return ts;
      case ' ':
      case 10:
      case 13:
        ++ts;
        break;
      case '<':
        if (!__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T': /* substruct */
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}': /* end of substruct; either repeat or move on */
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }        /* fall through */
      case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 's': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
        } else {
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_count = ctx->new_count;
          ctx->enc_packmode = ctx->new_packmode;
          ctx->enc_type = *ts;
          ctx->is_complex = got_Z;
        }
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}
static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  if (obj == Py_None || obj == NULL) {
    __Pyx_ZeroBuffer(buf);
    return 0;
  }
  buf->buf = NULL;
  if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
  if (buf->ndim != nd) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if ((unsigned)buf->itemsize != dtype->size) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_ZeroBuffer(buf);
  return -1;
}
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (info->buf == NULL) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}

static void __Pyx_RaiseBufferFallbackError(void) {
  PyErr_Format(PyExc_ValueError,
     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
}

static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    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)) {
        PyObject *args;
        if (!value)
            args = PyTuple_New(0);
        else if (PyTuple_Check(value)) {
            Py_INCREF(value);
            args = value;
        }
        else
            args = PyTuple_Pack(1, value);
        if (!args)
            goto bad;
        owned_instance = PyEval_CallObject(type, args);
        Py_DECREF(args);
        if (!owned_instance)
            goto bad;
        value = owned_instance;
        if (!PyExceptionInstance_Check(value)) {
            PyErr_Format(PyExc_TypeError,
                         "calling %R should have returned an instance of "
                         "BaseException, not %R",
                         type, Py_TYPE(value));
            goto bad;
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause && cause != Py_None) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    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;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    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 (DECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    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_mod_int(int a, int b) {
    int r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

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 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 void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    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);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    CYTHON_UNUSED PyObject *getbuffer_cobj;
  #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
  #endif
        if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
  #if PY_VERSION_HEX < 0x02060000
    if (obj->ob_type->tp_dict &&
        (getbuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
                                             "__pyx_getbuffer"))) {
        getbufferproc func;
      #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
        func = (getbufferproc) PyCapsule_GetPointer(getbuffer_cobj, "getbuffer(obj, view, flags)");
      #else
        func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj);
      #endif
        Py_DECREF(getbuffer_cobj);
        if (!func)
            goto fail;
        return func(obj, view, flags);
    } else {
        PyErr_Clear();
    }
  #endif
    PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
#if PY_VERSION_HEX < 0x02060000
fail:
#endif
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    CYTHON_UNUSED PyObject *releasebuffer_cobj;
    if (!obj) return;
  #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
  #endif
        if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; }
  #if PY_VERSION_HEX < 0x02060000
    if (obj->ob_type->tp_dict &&
        (releasebuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
                                                      "__pyx_releasebuffer"))) {
        releasebufferproc func;
      #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
        func = (releasebufferproc) PyCapsule_GetPointer(releasebuffer_cobj, "releasebuffer(obj, view)");
      #else
        func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj);
      #endif
        Py_DECREF(releasebuffer_cobj);
        if (!func)
            goto fail;
        func(obj, view);
        return;
    } else {
        PyErr_Clear();
    }
  #endif
    goto nofail;
#if PY_VERSION_HEX < 0x02060000
fail:
#endif
    PyErr_WriteUnraisable(obj);
nofail:
    Py_DECREF(obj);
    view->obj = NULL;
}
#endif /*  PY_MAJOR_VERSION < 3 */


    static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
#if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
                 PyString_AsString(name));
#else
    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
#endif
}

static 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 {
        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
        #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;
        }
        #endif
        return (npy_int64)-1;
    }
}

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;
    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) {
    const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_int64) == sizeof(char))  ||
        (sizeof(npy_int64) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_int64) == sizeof(int)) ||
               (sizeof(npy_int64) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t val) {
    const Py_intptr_t neg_one = (Py_intptr_t)-1, const_zero = (Py_intptr_t)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(Py_intptr_t) == sizeof(char))  ||
        (sizeof(Py_intptr_t) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(Py_intptr_t) == sizeof(int)) ||
               (sizeof(Py_intptr_t) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(Py_intptr_t) == 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(Py_intptr_t),
                                     little, !is_unsigned);
    }
}

#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 __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) {
    Py_complex cval;
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyComplex_CheckExact(o))
        cval = ((PyComplexObject *)o)->cval;
    else
#endif
        cval = PyComplex_AsCComplex(o);
    return __pyx_t_double_complex_from_parts(
               (double)cval.real,
               (double)cval.imag);
}

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 {
        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
        #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;
        }
        #endif
        return (npy_uint8)-1;
    }
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (op->func_doc == NULL && op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
        op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
        op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
    }
    if (op->func_doc == 0) {
        Py_INCREF(Py_None);
        return Py_None;
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        op->func_doc = Py_None; /* Mark as deleted */
    else
        op->func_doc = value;
    Py_INCREF(op->func_doc);
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (op->func_name == NULL) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (value == NULL || !PyUnicode_Check(value)) {
#else
    if (value == NULL || !PyString_Check(value)) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (op->func_dict == NULL) {
        op->func_dict = PyDict_New();
        if (op->func_dict == NULL)
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (value == NULL) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
{
    if (op->defaults_tuple) {
        Py_INCREF(op->defaults_tuple);
        return op->defaults_tuple;
    }
    if (op->defaults_getter) {
        PyObject *res = op->defaults_getter((PyObject *) op);
        if (res) {
            Py_INCREF(res);
            op->defaults_tuple = res;
        }
        return res;
    }
    Py_INCREF(Py_None);
    return Py_None;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_getter = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *func_name = __Pyx_CyFunction_get_name(op);
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                func_name, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(func_name), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, sizeof(size));
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}

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 {
        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
        #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;
        }
        #endif
        return (npy_int32)-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

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

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;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && (size_t)((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
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if ((size_t)((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 NULL;
}
#endif

#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%s does not export expected C function %s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0)
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %s.%s has wrong signature (expected %s, got %s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %s.%s has wrong signature (expected %s, got %s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #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_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) 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 = py_line;
    PyTraceBack_Here(py_frame);
bad:
    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 */
