/* Generated by Cython 0.19.1 on Wed Jul 24 13:19:30 2013 */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#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 < 0x02060000
  #define Py_TPFLAGS_HAVE_VERSION_TAG 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_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
                                         PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type)
#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
#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
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER)
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#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 "string.h"
#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

#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 Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return u_end - u - 1;
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#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))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params() {
    PyObject* sys = NULL;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    sys = PyImport_ImportModule("sys");
    if (sys == NULL) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    if (default_encoding == NULL) goto bad;
    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (ascii_chars_u == NULL) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
    }
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return 0;
bad:
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params() {
    PyObject* sys = NULL;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (sys == NULL) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    if (default_encoding == NULL) goto bad;
    default_encoding_c = PyBytes_AS_STRING(default_encoding);
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(sys);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


#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_d;
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_SeriesIndex;
struct __pyx_obj_6pandas_3lib_ValuesProperty;
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":438
 *     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":111
 * 
 * 
 * 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;
  PyObject *f;
  PyObject *bins;
};


/* "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":61
 *         obj._set_axis(self.axis, value)
 * 
 * cdef class SeriesIndex(object):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object _check_type
 */
struct __pyx_obj_6pandas_3lib_SeriesIndex {
  PyObject_HEAD
  PyObject *_check_type;
};


/* "pandas/src/properties.pyx":81
 * 
 * 
 * cdef class ValuesProperty(object):             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type):
 */
struct __pyx_obj_6pandas_3lib_ValuesProperty {
  PyObject_HEAD
};


/* "pandas/src/properties.pyx":47
 *         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":625
 *     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":223
 * 
 * 
 * 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;
  PyObject *f;
  PyObject *labels;
};


/* "pandas/src/inference.pyx":575
 *     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_datetime;
  PyObject *__pyx_v_dayfirst;
  PyObject *__pyx_v_default;
  PyObject *__pyx_v_parse;
};


/* "pandas/lib.pyx":1185
 *     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":5
 * 
 * 
 * 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;
  int can_set_name;
};


/* "pandas/src/reduce.pyx":335
 * 
 * 
 * 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":438
 *     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)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/

#define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \
    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
#define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \
    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \
    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

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 PyObject *__Pyx_GetModuleGlobalName(PyObject *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 void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename); /*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 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) & likely(len > (L->allocated >> 1))) {
        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

#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()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/

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

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_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_ListComp_Append(L,x) PyList_Append(L,x)
#endif

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

#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

#define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \
    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \
    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

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

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

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

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

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

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

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#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);

#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_qualname;
    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_kwdict;  /* Const kwonly defaults dict */
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations; /* function annotations dict */
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      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 CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __Pyx_CyFunction_init(void);

#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);

#include <string.h>

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

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

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

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


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, int level); /*proto*/

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 *qualname, 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 *);

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 int __Pyx_check_binary_version(void);

#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.string' */

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

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

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

/* Module declarations from 'numpy' */

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

/* Module declarations from 'cython' */

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

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

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

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

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

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

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

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

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

/* Module declarations from '__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*/

/* 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_BlockSlider = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesBinGrouper = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_cache_readonly = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesIndex = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_ValuesProperty = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_AxisProperty = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesGrouper = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib__PandasNull = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_Reducer = 0;
static PyTypeObject *__pyx_ptype_6pandas_3lib_Slider = 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 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 __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_AssertionError;
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_64clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_66max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_68string_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_70write_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_72create_hdf_rows_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer0, PyObject *__pyx_v_dtype, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_searchable, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_74create_hdf_rows_3d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer0, PyArrayObject *__pyx_v_indexer1, PyObject *__pyx_v_dtype, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_searchable, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_76create_hdf_rows_4d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer0, PyArrayObject *__pyx_v_indexer1, PyArrayObject *__pyx_v_indexer2, PyObject *__pyx_v_dtype, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_searchable, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_78arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_80is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_82generate_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_84row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_86row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_88group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_90lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_92count_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_94count_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_96fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_98duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_100generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_102indices_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_5dummy___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5dummy_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 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_5dummy___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5dummy_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 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_104apply_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_106reduce(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 int __pyx_pf_6pandas_3lib_11SeriesIndex___init__(struct __pyx_obj_6pandas_3lib_SeriesIndex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_11SeriesIndex_2__get__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static int __pyx_pf_6pandas_3lib_11SeriesIndex_4__set__(struct __pyx_obj_6pandas_3lib_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_14ValuesProperty___get__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib_ValuesProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_108infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_110infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_112is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_114is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_116is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_118is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_120is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_122is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_124is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_126is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_128is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_132is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_134is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_136is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_138is_date_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_140is_time_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_142is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_144is_period_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_146maybe_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_148maybe_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); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_150convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(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_152try_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_154try_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_156try_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_158try_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_160sanitize_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_162maybe_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_164map_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_166map_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_168to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_170tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_172to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6pandas_3lib_174fast_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 PyObject *__pyx_tp_new_6pandas_3lib_BlockSlider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_SeriesBinGrouper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_cache_readonly(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_SeriesIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_ValuesProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_AxisProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_SeriesGrouper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib__PandasNull(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_Reducer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pandas_3lib_Slider(PyTypeObject *t, PyObject *a, PyObject *k); /*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[] = "maybe_convert_objects";
static char __pyx_k_11[] = "Invalid length for values or for binner";
static char __pyx_k_13[] = "Values falls before first bin";
static char __pyx_k_15[] = "Values falls after last bin";
static char __pyx_k_22[] = "Dummy array must be same dtype";
static char __pyx_k_24[] = "Dummy array must be length %d";
static char __pyx_k_25[] = "function does not reduce";
static char __pyx_k_35[] = "_has_complex_internals";
static char __pyx_k_36[] = "Cannot modify frame index internals";
static char __pyx_k_38[] = "Function unsafe for fast apply";
static char __pyx_k_40[] = "Let this error raise above us";
static char __pyx_k_43[] = "Cannot use shortcut";
static char __pyx_k_46[] = "cannot set values for [%s]";
static char __pyx_k_47[] = "pandas.core.index";
static char __pyx_k_48[] = "Index length did not match values";
static char __pyx_k_50[] = "list_to_object_array";
static char __pyx_k_52[] = "is_integer_float_array";
static char __pyx_k_53[] = "mixed-integer-float";
static char __pyx_k_54[] = "mixed-integer";
static char __pyx_k_55[] = "is_timedelta_or_timedelta64_array";
static char __pyx_k_58[] = "Empty string encountered";
static char __pyx_k_60[] = ".";
static char __pyx_k_61[] = "M8[ns]";
static char __pyx_k_63[] = "%m/%d/%Y";
static char __pyx_k_64[] = "dateutil.parser";
static char __pyx_k_65[] = "try_parse_dates.<locals>.<lambda>";
static char __pyx_k_66[] = "pandas.lib";
static char __pyx_k_69[] = "pandas/src/inference.pyx";
static char __pyx_k_70[] = "try_parse_dates.<locals>.parse_date";
static char __pyx_k_71[] = "";
static char __pyx_k_73[] = "%H:%M:%S";
static char __pyx_k_74[] = "Length of dates and times must be equal";
static char __pyx_k_76[] = "try_parse_date_and_time.<locals>.<lambda>";
static char __pyx_k_79[] = "try_parse_date_and_time.<locals>.parse_date";
static char __pyx_k_82[] = "try_parse_date_and_time.<locals>.parse_time";
static char __pyx_k_83[] = "Length of years/months/days must all be equal";
static char __pyx_k_85[] = "Length of all datetime components must be equal";
static char __pyx_k_90[] = "Unable to parse %s";
static char __pyx_k_91[] = "ndarray is not C contiguous";
static char __pyx_k_93[] = "ndarray is not Fortran contiguous";
static char __pyx_k_95[] = "Non-native byte order not supported";
static char __pyx_k_97[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_98[] = "Format string allocated too short, see comment in numpy.pxd";
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[] = "Format string allocated too short.";
static char __pyx_k_103[] = "index out of bounds";
static char __pyx_k_108[] = "/home/wesm/code/pandas/pandas/lib.pyx";
static char __pyx_k_131[] = "fast_unique_multiple";
static char __pyx_k_134[] = "fast_unique_multiple_list";
static char __pyx_k_137[] = "fast_unique_multiple_list_gen";
static char __pyx_k_152[] = "maybe_indices_to_slice";
static char __pyx_k_155[] = "maybe_booleans_to_slice";
static char __pyx_k_170[] = "max_len_string_array";
static char __pyx_k_173[] = "string_array_replace_from_nan_rep";
static char __pyx_k_192[] = "row_bool_subset_object";
static char __pyx_k_211[] = "pandas/src/reduce.pyx";
static char __pyx_k_242[] = "is_timedelta64_array";
static char __pyx_k_255[] = "maybe_convert_numeric";
static char __pyx_k_264[] = "try_parse_date_and_time";
static char __pyx_k_267[] = "try_parse_year_month_day";
static char __pyx_k_270[] = "try_parse_datetime_components";
static char __pyx_k_283[] = "tuples_to_object_array";
static char __pyx_k_286[] = "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__op[] = "op";
static char __pyx_k__tz[] = "tz";
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__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__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__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___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__indexer0[] = "indexer0";
static char __pyx_k__indexer1[] = "indexer1";
static char __pyx_k__indexer2[] = "indexer2";
static char __pyx_k__ismember[] = "ismember";
static char __pyx_k__isscalar[] = "isscalar";
static char __pyx_k__itemsize[] = "itemsize";
static char __pyx_k__n_blocks[] = "n_blocks";
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__tup_size[] = "tup_size";
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____class__[] = "__class__";
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____import__[] = "__import__";
static char __pyx_k____module__[] = "__module__";
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__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__n_indexer0[] = "n_indexer0";
static char __pyx_k__n_indexer1[] = "n_indexer1";
static char __pyx_k__n_indexer2[] = "n_indexer2";
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__searchable[] = "searchable";
static char __pyx_k__seen_float[] = "seen_float";
static char __pyx_k__set_length[] = "set_length";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k____setattr__[] = "__setattr__";
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__isnullobj2d[] = "isnullobj2d";
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__RuntimeError[] = "RuntimeError";
static char __pyx_k____qualname__[] = "__qualname__";
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__is_timedelta[] = "is_timedelta";
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____metaclass__[] = "__metaclass__";
static char __pyx_k___ensure_index[] = "_ensure_index";
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__AssertionError[] = "AssertionError";
static char __pyx_k__AttributeError[] = "AttributeError";
static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__";
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__write_csv_rows[] = "write_csv_rows";
static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer";
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___make_time_series[] = "_make_time_series";
static char __pyx_k__apply_frame_axis0[] = "apply_frame_axis0";
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__create_hdf_rows_2d[] = "create_hdf_rows_2d";
static char __pyx_k__create_hdf_rows_3d[] = "create_hdf_rows_3d";
static char __pyx_k__create_hdf_rows_4d[] = "create_hdf_rows_4d";
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____pyx_releasebuffer[] = "__pyx_releasebuffer";
static char __pyx_k__get_reverse_indexer[] = "get_reverse_indexer";
static char __pyx_k__is_datetime64_array[] = "is_datetime64_array";
static PyObject *__pyx_n_s_10;
static PyObject *__pyx_kp_u_101;
static PyObject *__pyx_kp_s_103;
static PyObject *__pyx_kp_s_108;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_n_s_131;
static PyObject *__pyx_n_s_134;
static PyObject *__pyx_n_s_137;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_n_s_152;
static PyObject *__pyx_n_s_155;
static PyObject *__pyx_n_s_170;
static PyObject *__pyx_n_s_173;
static PyObject *__pyx_n_s_192;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_211;
static PyObject *__pyx_kp_s_22;
static PyObject *__pyx_kp_s_24;
static PyObject *__pyx_n_s_242;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_n_s_255;
static PyObject *__pyx_n_s_264;
static PyObject *__pyx_n_s_267;
static PyObject *__pyx_n_s_270;
static PyObject *__pyx_n_s_283;
static PyObject *__pyx_n_s_286;
static PyObject *__pyx_n_s_35;
static PyObject *__pyx_kp_s_36;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_kp_s_40;
static PyObject *__pyx_kp_s_43;
static PyObject *__pyx_kp_s_46;
static PyObject *__pyx_n_s_47;
static PyObject *__pyx_kp_s_48;
static PyObject *__pyx_n_s_50;
static PyObject *__pyx_n_s_52;
static PyObject *__pyx_kp_s_53;
static PyObject *__pyx_kp_s_54;
static PyObject *__pyx_n_s_55;
static PyObject *__pyx_kp_s_58;
static PyObject *__pyx_kp_s_6;
static PyObject *__pyx_kp_s_60;
static PyObject *__pyx_kp_s_61;
static PyObject *__pyx_kp_s_63;
static PyObject *__pyx_n_s_64;
static PyObject *__pyx_n_s_65;
static PyObject *__pyx_n_s_66;
static PyObject *__pyx_kp_s_69;
static PyObject *__pyx_n_s_70;
static PyObject *__pyx_kp_s_71;
static PyObject *__pyx_kp_s_73;
static PyObject *__pyx_kp_s_74;
static PyObject *__pyx_n_s_76;
static PyObject *__pyx_n_s_79;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_n_s_82;
static PyObject *__pyx_kp_s_83;
static PyObject *__pyx_kp_s_85;
static PyObject *__pyx_kp_s_90;
static PyObject *__pyx_kp_u_91;
static PyObject *__pyx_kp_u_93;
static PyObject *__pyx_kp_u_95;
static PyObject *__pyx_kp_u_97;
static PyObject *__pyx_kp_u_98;
static PyObject *__pyx_n_s__AssertionError;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_s__C;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__F;
static PyObject *__pyx_n_s__FALSE;
static PyObject *__pyx_n_s__False;
static PyObject *__pyx_n_s__ImportError;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_s__InvalidApply;
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____class__;
static PyObject *__pyx_n_s____import__;
static PyObject *__pyx_n_s____len__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____metaclass__;
static PyObject *__pyx_n_s____module__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____pyx_getbuffer;
static PyObject *__pyx_n_s____pyx_releasebuffer;
static PyObject *__pyx_n_s____pyx_vtable__;
static PyObject *__pyx_n_s____qualname__;
static PyObject *__pyx_n_s____setattr__;
static PyObject *__pyx_n_s____test__;
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___ensure_index;
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___make_time_series;
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__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__b;
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_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__create_hdf_rows_2d;
static PyObject *__pyx_n_s__create_hdf_rows_3d;
static PyObject *__pyx_n_s__create_hdf_rows_4d;
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__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__idatetimes;
static PyObject *__pyx_n_s__idx;
static PyObject *__pyx_n_s__index;
static PyObject *__pyx_n_s__indexer;
static PyObject *__pyx_n_s__indexer0;
static PyObject *__pyx_n_s__indexer1;
static PyObject *__pyx_n_s__indexer2;
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_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;
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__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__n_blocks;
static PyObject *__pyx_n_s__n_indexer0;
static PyObject *__pyx_n_s__n_indexer1;
static PyObject *__pyx_n_s__n_indexer2;
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__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__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__searchable;
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__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__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__tup_size;
static PyObject *__pyx_n_s__tuples;
static PyObject *__pyx_n_s__type;
static PyObject *__pyx_n_s__tz;
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_17;
static PyObject *__pyx_k_19;
static PyObject *__pyx_k_45;
static PyObject *__pyx_k_56;
static PyObject *__pyx_k_57;
static PyObject *__pyx_k_62;
static PyObject *__pyx_k_72;
static PyObject *__pyx_k_87;
static PyObject *__pyx_k_88;
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_slice_42;
static PyObject *__pyx_k_tuple_12;
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_21;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_26;
static PyObject *__pyx_k_tuple_27;
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_37;
static PyObject *__pyx_k_tuple_39;
static PyObject *__pyx_k_tuple_41;
static PyObject *__pyx_k_tuple_44;
static PyObject *__pyx_k_tuple_49;
static PyObject *__pyx_k_tuple_51;
static PyObject *__pyx_k_tuple_59;
static PyObject *__pyx_k_tuple_67;
static PyObject *__pyx_k_tuple_75;
static PyObject *__pyx_k_tuple_77;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_86;
static PyObject *__pyx_k_tuple_89;
static PyObject *__pyx_k_tuple_92;
static PyObject *__pyx_k_tuple_94;
static PyObject *__pyx_k_tuple_96;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_100;
static PyObject *__pyx_k_tuple_102;
static PyObject *__pyx_k_tuple_104;
static PyObject *__pyx_k_tuple_105;
static PyObject *__pyx_k_tuple_106;
static PyObject *__pyx_k_tuple_109;
static PyObject *__pyx_k_tuple_111;
static PyObject *__pyx_k_tuple_113;
static PyObject *__pyx_k_tuple_115;
static PyObject *__pyx_k_tuple_117;
static PyObject *__pyx_k_tuple_119;
static PyObject *__pyx_k_tuple_121;
static PyObject *__pyx_k_tuple_123;
static PyObject *__pyx_k_tuple_125;
static PyObject *__pyx_k_tuple_127;
static PyObject *__pyx_k_tuple_129;
static PyObject *__pyx_k_tuple_132;
static PyObject *__pyx_k_tuple_135;
static PyObject *__pyx_k_tuple_138;
static PyObject *__pyx_k_tuple_140;
static PyObject *__pyx_k_tuple_142;
static PyObject *__pyx_k_tuple_144;
static PyObject *__pyx_k_tuple_146;
static PyObject *__pyx_k_tuple_148;
static PyObject *__pyx_k_tuple_150;
static PyObject *__pyx_k_tuple_153;
static PyObject *__pyx_k_tuple_156;
static PyObject *__pyx_k_tuple_158;
static PyObject *__pyx_k_tuple_160;
static PyObject *__pyx_k_tuple_162;
static PyObject *__pyx_k_tuple_164;
static PyObject *__pyx_k_tuple_166;
static PyObject *__pyx_k_tuple_168;
static PyObject *__pyx_k_tuple_171;
static PyObject *__pyx_k_tuple_174;
static PyObject *__pyx_k_tuple_176;
static PyObject *__pyx_k_tuple_178;
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_193;
static PyObject *__pyx_k_tuple_195;
static PyObject *__pyx_k_tuple_197;
static PyObject *__pyx_k_tuple_199;
static PyObject *__pyx_k_tuple_201;
static PyObject *__pyx_k_tuple_203;
static PyObject *__pyx_k_tuple_205;
static PyObject *__pyx_k_tuple_207;
static PyObject *__pyx_k_tuple_209;
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_230;
static PyObject *__pyx_k_tuple_232;
static PyObject *__pyx_k_tuple_234;
static PyObject *__pyx_k_tuple_236;
static PyObject *__pyx_k_tuple_238;
static PyObject *__pyx_k_tuple_240;
static PyObject *__pyx_k_tuple_243;
static PyObject *__pyx_k_tuple_245;
static PyObject *__pyx_k_tuple_247;
static PyObject *__pyx_k_tuple_249;
static PyObject *__pyx_k_tuple_251;
static PyObject *__pyx_k_tuple_253;
static PyObject *__pyx_k_tuple_256;
static PyObject *__pyx_k_tuple_258;
static PyObject *__pyx_k_tuple_260;
static PyObject *__pyx_k_tuple_262;
static PyObject *__pyx_k_tuple_265;
static PyObject *__pyx_k_tuple_268;
static PyObject *__pyx_k_tuple_271;
static PyObject *__pyx_k_tuple_273;
static PyObject *__pyx_k_tuple_275;
static PyObject *__pyx_k_tuple_277;
static PyObject *__pyx_k_tuple_279;
static PyObject *__pyx_k_tuple_281;
static PyObject *__pyx_k_tuple_284;
static PyObject *__pyx_k_tuple_287;
static PyObject *__pyx_k_codeobj_68;
static PyObject *__pyx_k_codeobj_78;
static PyObject *__pyx_k_codeobj_81;
static PyObject *__pyx_k_codeobj_107;
static PyObject *__pyx_k_codeobj_110;
static PyObject *__pyx_k_codeobj_112;
static PyObject *__pyx_k_codeobj_114;
static PyObject *__pyx_k_codeobj_116;
static PyObject *__pyx_k_codeobj_118;
static PyObject *__pyx_k_codeobj_120;
static PyObject *__pyx_k_codeobj_122;
static PyObject *__pyx_k_codeobj_124;
static PyObject *__pyx_k_codeobj_126;
static PyObject *__pyx_k_codeobj_128;
static PyObject *__pyx_k_codeobj_130;
static PyObject *__pyx_k_codeobj_133;
static PyObject *__pyx_k_codeobj_136;
static PyObject *__pyx_k_codeobj_139;
static PyObject *__pyx_k_codeobj_141;
static PyObject *__pyx_k_codeobj_143;
static PyObject *__pyx_k_codeobj_145;
static PyObject *__pyx_k_codeobj_147;
static PyObject *__pyx_k_codeobj_149;
static PyObject *__pyx_k_codeobj_151;
static PyObject *__pyx_k_codeobj_154;
static PyObject *__pyx_k_codeobj_157;
static PyObject *__pyx_k_codeobj_159;
static PyObject *__pyx_k_codeobj_161;
static PyObject *__pyx_k_codeobj_163;
static PyObject *__pyx_k_codeobj_165;
static PyObject *__pyx_k_codeobj_167;
static PyObject *__pyx_k_codeobj_169;
static PyObject *__pyx_k_codeobj_172;
static PyObject *__pyx_k_codeobj_175;
static PyObject *__pyx_k_codeobj_177;
static PyObject *__pyx_k_codeobj_179;
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_194;
static PyObject *__pyx_k_codeobj_196;
static PyObject *__pyx_k_codeobj_198;
static PyObject *__pyx_k_codeobj_200;
static PyObject *__pyx_k_codeobj_202;
static PyObject *__pyx_k_codeobj_204;
static PyObject *__pyx_k_codeobj_206;
static PyObject *__pyx_k_codeobj_208;
static PyObject *__pyx_k_codeobj_210;
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_231;
static PyObject *__pyx_k_codeobj_233;
static PyObject *__pyx_k_codeobj_235;
static PyObject *__pyx_k_codeobj_237;
static PyObject *__pyx_k_codeobj_239;
static PyObject *__pyx_k_codeobj_241;
static PyObject *__pyx_k_codeobj_244;
static PyObject *__pyx_k_codeobj_246;
static PyObject *__pyx_k_codeobj_248;
static PyObject *__pyx_k_codeobj_250;
static PyObject *__pyx_k_codeobj_252;
static PyObject *__pyx_k_codeobj_254;
static PyObject *__pyx_k_codeobj_257;
static PyObject *__pyx_k_codeobj_259;
static PyObject *__pyx_k_codeobj_261;
static PyObject *__pyx_k_codeobj_263;
static PyObject *__pyx_k_codeobj_266;
static PyObject *__pyx_k_codeobj_269;
static PyObject *__pyx_k_codeobj_272;
static PyObject *__pyx_k_codeobj_274;
static PyObject *__pyx_k_codeobj_276;
static PyObject *__pyx_k_codeobj_278;
static PyObject *__pyx_k_codeobj_280;
static PyObject *__pyx_k_codeobj_282;
static PyObject *__pyx_k_codeobj_285;
static PyObject *__pyx_k_codeobj_288;

/* "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 = ((PyObject*)__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, 1, 1, 1); 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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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;}
    __pyx_t_14 = (__pyx_t_13 != 0);
    if (__pyx_t_14) {

      /* "pandas/lib.pyx":108
 *         val = util.get_value_at(arr, i)
 *         if val in values:
 *             result[i] = 1             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = 0
 */
      __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 = 108; __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) = 1;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/lib.pyx":110
 *             result[i] = 1
 *         else:
 *             result[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
      __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[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_16, __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 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_v_y = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_date));

  /* "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_v_m = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_date));

  /* "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_v_d = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_date));

  /* "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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = (PyObject *) *__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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = __Pyx_PyObject_GetAttrStr(__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":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
 */

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":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):
 */
  __pyx_t_1 = (is_float_object(__pyx_v_val) != 0);
  if (!__pyx_t_1) {
    __pyx_t_2 = (is_complex_object(__pyx_v_val) != 0);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":176
 * 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 = 176; __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":177
 *     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_3 = (is_datetime64_object(__pyx_v_val) != 0);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":178
 *         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 = 178; __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":179
 *     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_GetModuleGlobalName(__pyx_n_s__NaT); 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_t_3 = (__pyx_v_val == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":180
 *         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 = 180; __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":181
 *     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) != 0);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":182
 *         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 = 182; __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":183
 *     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 = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":184
 *         return get_timedelta64_value(val) == NPY_NAT
 *     elif is_array(val):
 *         return False             # <<<<<<<<<<<<<<
 *     else:
 *         return util._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 = 184; __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":186
 *         return False
 *     else:
 *         return util._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 = 186; __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":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
 */

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 = 174; __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":188
 *         return util._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":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):
 */
  __pyx_t_1 = (is_float_object(__pyx_v_val) != 0);
  if (!__pyx_t_1) {
    __pyx_t_2 = (is_complex_object(__pyx_v_val) != 0);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":190
 * 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 = 190; __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 = 190; __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 = 190; __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 = 190; __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 = 190; __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 = 190; __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 = 190; __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":191
 *     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_3 = (is_datetime64_object(__pyx_v_val) != 0);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":192
 *         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 = 192; __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":193
 *     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_GetModuleGlobalName(__pyx_n_s__NaT); 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_t_3 = (__pyx_v_val == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":194
 *         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 = 194; __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":195
 *     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) != 0);
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":196
 *         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 = 196; __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":197
 *     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 = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {

    /* "pandas/lib.pyx":198
 *         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 = 198; __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":200
 *         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 = 200; __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":188
 *         return util._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 = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas.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":202
 *         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":203
 * 
 * def isscalar(object val):
 *     return np.isscalar(val) or val is None or PyDateTime_Check(val)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__isscalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __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 = 203; __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 = 203; __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 = 203; __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 = 203; __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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 208; __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":208
 * @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;
  __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", 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 = 208; __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":213
 *     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 = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":214
 * 
 *     n = len(arr)
 *     result = np.zeros(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         result[i] = util._checknull(arr[i])
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __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 = 214; __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 = 214; __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 = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __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 = 214; __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 = 214; __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 = 214; __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 = 214; __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":215
 *     n = len(arr)
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         result[i] = util._checknull(arr[i])
 *     return result.view(np.bool_)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/lib.pyx":216
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:
 *         result[i] = util._checknull(arr[i])             # <<<<<<<<<<<<<<
 *     return result.view(np.bool_)
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_6 = (PyObject *) *__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(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "pandas/lib.pyx":217
 *     for i from 0 <= i < n:
 *         result[i] = util._checknull(arr[i])
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = (PyObject *) *__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 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = __Pyx_PyObject_GetAttrStr(((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_GOTREF(__pyx_t_2);
    __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;}
    __Pyx_GOTREF(__pyx_t_3);
    #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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = (PyObject *) *__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 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = (PyObject *) *__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 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = __Pyx_PyObject_GetAttrStr(((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_GOTREF(__pyx_t_2);
    __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;}
    __Pyx_GOTREF(__pyx_t_3);
    #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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = (PyObject *) *__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 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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, 1, 1, 1); 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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  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 = ((PyObject*)__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 = ((PyObject*)__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 = (PyObject *) *__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;}
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (__pyx_t_5) {

      /* "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_6 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -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_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "pandas/lib.pyx":312
 *             uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      __pyx_t_6 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_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_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_10) {
      PyErr_Restore(0,0,0);
      goto __pyx_L7_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    __pyx_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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_t_11;
  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 = ((PyObject*)__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 = ((PyObject*)__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 = (PyObject *) *__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;}
      __pyx_t_10 = (__pyx_t_9 != 0);
      if (__pyx_t_10) {

        /* "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_11 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_11 == -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_11 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_11 == -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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  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 = ((PyObject*)__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 = ((PyObject*)__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;}
      __pyx_t_5 = (__pyx_t_4 != 0);
      if (__pyx_t_5) {

        /* "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_6 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -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_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

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

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

  /* "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;
  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_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 = ((PyObject*)__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 = ((PyObject*)__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;}
      __pyx_t_7 = (__pyx_t_6 != 0);
      if (__pyx_t_7) {

        /* "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_8 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_8 == -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_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "pandas/lib.pyx":389
 * 
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      __pyx_t_8 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
    }
    __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_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_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_12) {
      PyErr_Restore(0,0,0);
      goto __pyx_L9_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);
    goto __pyx_L1_error;
    __pyx_L9_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_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject **__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("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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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;}
      __pyx_t_15 = (__pyx_t_14 != 0);
      if (__pyx_t_15) {

        /* "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_16 = __pyx_v_i;
        __pyx_t_17 = __pyx_v_j;
        __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;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "pandas/lib.pyx":416
 *                 result[i, j] = row[col]
 *             else:
 *                 result[i, j] = onan             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __pyx_t_19 = __pyx_v_i;
        __pyx_t_20 = __pyx_v_j;
        __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides);
        __Pyx_GOTREF(*__pyx_t_18);
        __Pyx_INCREF(__pyx_v_onan); __Pyx_DECREF(*__pyx_t_18);
        *__pyx_t_18 = __pyx_v_onan;
        __Pyx_GIVEREF(*__pyx_t_18);
      }
      __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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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, 1, 0, 1); 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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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, 1, 0, 1); 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 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "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_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __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":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_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_arr);
    __pyx_v_arr = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/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_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_it));
    __pyx_v_it = ((PyArrayIterObject *)__pyx_t_5);
    __pyx_t_5 = 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) != 0);
    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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __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[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_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), 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_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 = (PyObject *) *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = __Pyx_PyObject_GetAttrStr(((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) != 0);
    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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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) != 0);
    if (!__pyx_t_8) {
      __pyx_t_9 = ((__pyx_v_val == __pyx_v_neginf) != 0);
      __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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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) != 0);
    if (!__pyx_t_8) {
      __pyx_t_9 = ((__pyx_v_val == __pyx_v_neginf) != 0);
      __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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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;
  int __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("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 = ((PyObject*)__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 = __Pyx_ImportFrom(__pyx_t_3, __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 = __Pyx_PyObject_GetAttrStr(__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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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;}
    __pyx_t_13 = (__pyx_t_12 != 0);
    if (__pyx_t_13) {

      /* "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_14 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __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_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_15);
      *__pyx_t_15 = __pyx_t_5;
      __Pyx_GIVEREF(*__pyx_t_15);
      __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_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __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_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_15);
      *__pyx_t_15 = __pyx_t_3;
      __Pyx_GIVEREF(*__pyx_t_15);
      __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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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) != 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) != 0);
    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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  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)) != 0);
    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:
 */
      __pyx_t_5 = (__pyx_v_finished != 0);
      if (__pyx_t_5) {

        /* "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 = __Pyx_PyObject_GetAttrStr(((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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_5 = ((!(__pyx_v_started != 0)) != 0);
      if (__pyx_t_5) {

        /* "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
 * 
 */
      __pyx_t_5 = (__pyx_v_finished != 0);
      if (__pyx_t_5) {

        /* "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
 */
      __pyx_t_5 = (__pyx_v_started != 0);
      if (__pyx_t_5) {

        /* "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_5 = ((!(__pyx_v_started != 0)) != 0);
  if (__pyx_t_5) {

    /* "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_5 = ((!(__pyx_v_finished != 0)) != 0);
  if (__pyx_t_5) {

    /* "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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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;
  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;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("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 = __Pyx_PyObject_GetAttrStr(__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;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "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 = __Pyx_PyObject_GetAttrStr(__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_4 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 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 = __Pyx_PyObject_GetAttrStr(__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;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "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 = __Pyx_PyObject_GetAttrStr(__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_4 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 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 = __Pyx_PyObject_GetAttrStr(__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;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "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 = __Pyx_PyObject_GetAttrStr(__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_4 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 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_GetModuleGlobalName(__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_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); 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_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_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_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_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __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_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__uint8); 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_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); 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_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_6);
  {
    __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_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 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) != 0);
  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_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "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_14 = __pyx_v_i;
      __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_x);
      __pyx_v_x = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/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) != 0);
      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_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) = 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_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_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_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

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

      /* "pandas/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) != 0);
      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_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) = 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_19 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __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_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); 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_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), 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_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 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_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_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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;
  int __pyx_t_6;
  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;
  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) != 0);
  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 = __Pyx_PyObject_GetAttrStr(__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;
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (__pyx_t_6) {

    /* "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 = __Pyx_PyObject_GetAttrStr(__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_6 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_6 != 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 = __Pyx_PyObject_GetAttrStr(__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;
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (__pyx_t_6) {

    /* "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 = __Pyx_PyObject_GetAttrStr(__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_6 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_6 != 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 = __Pyx_PyObject_GetAttrStr(__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;
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (__pyx_t_6) {

    /* "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 = __Pyx_PyObject_GetAttrStr(__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_6 = (__pyx_v_op == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_6 != 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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __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 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __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_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __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_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), 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_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __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_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 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) != 0);
  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_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "pandas/lib.pyx":646
 *     if flag == cpython.Py_NE:
 *         for i in range(n):
 *             x = left[i]             # <<<<<<<<<<<<<<
 *             y = right[i]
 * 
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __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_15 = __pyx_v_i;
      __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_15, __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) != 0);
      if (!__pyx_t_3) {
        __pyx_t_6 = (__pyx_f_4util__checknull(__pyx_v_y) != 0);
        __pyx_t_16 = __pyx_t_6;
      } 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_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "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 = (PyObject *) *__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 = (PyObject *) *__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) != 0);
      if (!__pyx_t_16) {
        __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_y) != 0);
        __pyx_t_6 = __pyx_t_3;
      } else {
        __pyx_t_6 = __pyx_t_16;
      }
      if (__pyx_t_6) {

        /* "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_6 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_6 == -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_6;
      }
      __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 = __Pyx_PyObject_GetAttrStr(((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_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), 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_7)); __pyx_t_7 = 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_7);
  { 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __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)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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":676
 *     result = np.empty(n, dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         x = values[i]
 *         if util._checknull(x):
 */
  __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":677
 * 
 *     for i in range(n):
 *         x = values[i]             # <<<<<<<<<<<<<<
 *         if util._checknull(x):
 *             result[i] = x
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __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":678
 *     for i in range(n):
 *         x = values[i]
 *         if util._checknull(x):             # <<<<<<<<<<<<<<
 *             result[i] = x
 *         else:
 */
    __pyx_t_13 = (__pyx_f_4util__checknull(__pyx_v_x) != 0);
    if (__pyx_t_13) {

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

      /* "pandas/lib.pyx":681
 *             result[i] = x
 *         else:
 *             result[i] = op(x, val)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_2 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 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_L5:;
  }

  /* "pandas/lib.pyx":683
 *             result[i] = op(x, val)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 683; __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 = 683; __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 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 683; __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_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 687; __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 = 687; __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 = 687; __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 = 687; __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 = 687; __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 = 687; __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":687
 * @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 = 687; __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 = 687; __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":689
 * 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 = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":692
 *         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 = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((__pyx_v_n != __pyx_t_1) != 0);
  if (__pyx_t_2) {

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

  /* "pandas/lib.pyx":696
 *                          % (n, len(right)))
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); 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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); 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);
  __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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":698
 *     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":699
 * 
 *     for i in range(n):
 *         x = left[i]             # <<<<<<<<<<<<<<
 *         y = right[i]
 *         try:
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_6 = (PyObject *) *__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":700
 *     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 = (PyObject *) *__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":701
 *         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":702
 *         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 = 702; __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 = 702; __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":703
 *         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 = 703; __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":704
 *             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) != 0);
        if (__pyx_t_2) {

          /* "pandas/lib.pyx":705
 *         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":706
 *             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) != 0);
        if (__pyx_t_2) {

          /* "pandas/lib.pyx":707
 *                 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":709
 *                 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 = 709; __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":711
 *                 raise
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 711; __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 = 711; __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 = 711; __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 714; __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 = 714; __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 = 714; __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 = 714; __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":714
 * 
 * 
 * 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;
  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;
  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("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 = 714; __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":716
 * def astype_intsafe(ndarray[object] arr, new_dtype):
 *     cdef:
 *         Py_ssize_t i, n = len(arr)             # <<<<<<<<<<<<<<
 *         ndarray result
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":719
 *         ndarray result
 * 
 *     result = np.empty(n, dtype=new_dtype)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         util.set_value_at(result, i, arr[i])
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __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 = 719; __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 = 719; __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 = 719; __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 = 719; __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 = 719; __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 = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":720
 * 
 *     result = np.empty(n, dtype=new_dtype)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         util.set_value_at(result, i, arr[i])
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/lib.pyx":721
 *     result = np.empty(n, dtype=new_dtype)
 *     for i in range(n):
 *         util.set_value_at(result, i, 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 = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_7 >= __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[2]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __pyx_t_4 = __pyx_f_4util_set_value_at(__pyx_v_result, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "pandas/lib.pyx":723
 *         util.set_value_at(result, i, arr[i])
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def clean_index_list(list obj):
 */
  __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_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((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_65clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_6pandas_3lib_64clean_index_list[] = "\n    Utility used in pandas.core.index._ensure_index\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_65clean_index_list = {__Pyx_NAMESTR("clean_index_list"), (PyCFunction)__pyx_pw_6pandas_3lib_65clean_index_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_64clean_index_list)};
static PyObject *__pyx_pw_6pandas_3lib_65clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_64clean_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":725
 *     return result
 * 
 * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Utility used in pandas.core.index._ensure_index
 */

static PyObject *__pyx_pf_6pandas_3lib_64clean_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":731
 *     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 = 731; __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 = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":733
 *         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":735
 *         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":736
 * 
 *     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 = 736; __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, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 736; __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":737
 *     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) != 0);
    if (!__pyx_t_4) {
      __pyx_t_5 = (PyArray_Check(__pyx_v_v) != 0);
      __pyx_t_6 = __pyx_t_5;
    } else {
      __pyx_t_6 = __pyx_t_4;
    }
    __pyx_t_4 = ((!__pyx_t_6) != 0);
    if (__pyx_t_4) {

      /* "pandas/lib.pyx":738
 *         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":739
 *         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":741
 *             break
 * 
 *     if all_arrays:             # <<<<<<<<<<<<<<
 *         return obj, all_arrays
 * 
 */
  __pyx_t_4 = (__pyx_v_all_arrays != 0);
  if (__pyx_t_4) {

    /* "pandas/lib.pyx":742
 * 
 *     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 = 742; __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 = 742; __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":744
 *         return obj, all_arrays
 * 
 *     converted = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v = obj[i]
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 744; __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 = 744; __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 = 744; __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 = 744; __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 = 744; __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 = 744; __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 = 744; __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 = 744; __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":745
 * 
 *     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":746
 *     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 = 746; __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, 1, 1, 1); if (!__pyx_t_9) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 746; __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":747
 *     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) != 0);
    if (!__pyx_t_4) {
      __pyx_t_6 = (PyArray_Check(__pyx_v_v) != 0);
      __pyx_t_5 = __pyx_t_6;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    if (__pyx_t_5) {

      /* "pandas/lib.pyx":748
 *         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 = 748; __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 = 748; __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 = 748; __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":750
 *             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 = 750; __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":752
 *             converted[i] = v
 * 
 *     return maybe_convert_objects(converted), 0             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 752; __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 = 752; __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 = 752; __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 = 752; __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_67max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static char __pyx_doc_6pandas_3lib_66max_len_string_array[] = " return the maximum size of elements in a 1-dim string array ";
static PyMethodDef __pyx_mdef_6pandas_3lib_67max_len_string_array = {__Pyx_NAMESTR("max_len_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_67max_len_string_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_66max_len_string_array)};
static PyObject *__pyx_pw_6pandas_3lib_67max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_66max_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":756
 * @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_66max_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 = 756; __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":760
 *     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 = 760; __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":763
 *         object v
 * 
 *     m = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < length:
 *         v = arr[i]
 */
  __pyx_v_m = 0;

  /* "pandas/lib.pyx":764
 * 
 *     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 = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "pandas/lib.pyx":765
 *     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 = (PyObject *) *__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":766
 *     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) != 0);
    if (!__pyx_t_4) {
      __pyx_t_5 = (PyBytes_Check(__pyx_v_v) != 0);
      __pyx_t_6 = __pyx_t_5;
    } else {
      __pyx_t_6 = __pyx_t_4;
    }
    if (__pyx_t_6) {

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

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

        /* "pandas/lib.pyx":770
 * 
 *             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":772
 *                 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 = 772; __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_69string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_68string_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_69string_array_replace_from_nan_rep = {__Pyx_NAMESTR("string_array_replace_from_nan_rep"), (PyCFunction)__pyx_pw_6pandas_3lib_69string_array_replace_from_nan_rep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_68string_array_replace_from_nan_rep)};
static PyObject *__pyx_pw_6pandas_3lib_69string_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":776
 * @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 = 776; __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 = 776; __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 = 776; __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 = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_68string_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_68string_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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject **__pyx_t_8;
  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 = 776; __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":779
 *     """ 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":780
 * 
 *     cdef int length = arr.shape[0], i = 0
 *     if replace is None:             # <<<<<<<<<<<<<<
 *         replace = np.nan
 * 
 */
  __pyx_t_1 = (__pyx_v_replace == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/lib.pyx":781
 *     cdef int length = arr.shape[0], i = 0
 *     if replace is None:
 *         replace = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < length:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_replace);
    __pyx_v_replace = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

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

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

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

  /* "pandas/lib.pyx":787
 *             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_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_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_71write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_71write_csv_rows = {__Pyx_NAMESTR("write_csv_rows"), (PyCFunction)__pyx_pw_6pandas_3lib_71write_csv_rows, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_71write_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_70write_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":791
 * @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_70write_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":798
 * 
 *     # In crude testing, N>100 yields little marginal improvement
 *     N=100             # <<<<<<<<<<<<<<
 * 
 *     # pre-allocate  rows
 */
  __pyx_v_N = 100;

  /* "pandas/lib.pyx":801
 * 
 *     # 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 = 801; __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 = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ncols = __pyx_t_1;

  /* "pandas/lib.pyx":802
 *     # 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 = 802; __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 = 802; __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_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  }
  __pyx_v_rows = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/lib.pyx":804
 *     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":805
 * 
 *     j = -1
 *     if nlevels == 1:             # <<<<<<<<<<<<<<
 *         for j in range(len(data_index)):
 *             row = rows[j % N]
 */
  __pyx_t_6 = ((__pyx_v_nlevels == 1) != 0);
  if (__pyx_t_6) {

    /* "pandas/lib.pyx":806
 *     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 = 806; __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 = 806; __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":807
 *     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)) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        #ifdef WITH_THREAD
        PyGILState_Release(__pyx_gilstate_save);
        #endif
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N);
      __pyx_t_2 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/lib.pyx":808
 *         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 = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j);
      __Pyx_INCREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_row, 0, __pyx_t_2, sizeof(long), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/lib.pyx":809
 *             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":810
 *             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 = 810; __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, 0, 0, 0); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = (1 + __pyx_v_i);
        if (__Pyx_SetItemInt(__pyx_v_row, __pyx_t_8, __pyx_t_2, sizeof(long), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "pandas/lib.pyx":812
 *                 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)) != 0);
      if (__pyx_t_6) {
        if (unlikely(__pyx_v_N == 0)) {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
          #endif
          PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          #ifdef WITH_THREAD
          PyGILState_Release(__pyx_gilstate_save);
          #endif
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_9 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0);
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_6;
      }
      if (__pyx_t_10) {

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

  /* "pandas/lib.pyx":814
 *             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) != 0);
  if (__pyx_t_10) {

    /* "pandas/lib.pyx":815
 *                 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 = 815; __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 = 815; __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":816
 *     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)) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        #ifdef WITH_THREAD
        PyGILState_Release(__pyx_gilstate_save);
        #endif
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 816; __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":817
 *         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 = 817; __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 = 817; __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_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      if (__Pyx_PyObject_SetSlice(__pyx_v_row, __pyx_t_5, 0, __pyx_v_nlevels, NULL, NULL, NULL, 0, 1, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/lib.pyx":818
 *             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":819
 *             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 = 819; __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, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = (__pyx_v_nlevels + __pyx_v_i);
        if (__Pyx_SetItemInt(__pyx_v_row, __pyx_t_12, __pyx_t_5, sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "pandas/lib.pyx":821
 *                 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)) != 0);
      if (__pyx_t_10) {
        if (unlikely(__pyx_v_N == 0)) {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
          #endif
          PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          #ifdef WITH_THREAD
          PyGILState_Release(__pyx_gilstate_save);
          #endif
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0);
        __pyx_t_9 = __pyx_t_6;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      if (__pyx_t_9) {

        /* "pandas/lib.pyx":822
 * 
 *             if j >= N-1 and j % N == N-1:
 *                 writer.writerows(rows)             # <<<<<<<<<<<<<<
 *     else:
 *         for j in range(len(data_index)):
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 822; __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 = 822; __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 = 822; __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_L15;
      }
      __pyx_L15:;
    }
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/lib.pyx":824
 *                 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 = 824; __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 = 824; __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":825
 *     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)) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        #ifdef WITH_THREAD
        PyGILState_Release(__pyx_gilstate_save);
        #endif
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N);
      __pyx_t_2 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/lib.pyx":826
 *         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":827
 *             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 = 827; __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, 0, 0, 0); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_SetItemInt(__pyx_v_row, __pyx_v_i, __pyx_t_2, sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "pandas/lib.pyx":829
 *                 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)) != 0);
      if (__pyx_t_9) {
        if (unlikely(__pyx_v_N == 0)) {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
          #endif
          PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          #ifdef WITH_THREAD
          PyGILState_Release(__pyx_gilstate_save);
          #endif
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0);
        __pyx_t_6 = __pyx_t_10;
      } else {
        __pyx_t_6 = __pyx_t_9;
      }
      if (__pyx_t_6) {

        /* "pandas/lib.pyx":830
 * 
 *             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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __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 = 830; __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 = 830; __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_L20;
      }
      __pyx_L20:;
    }
  }
  __pyx_L5:;

  /* "pandas/lib.pyx":832
 *                 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) != 0);
  if (__pyx_t_6) {
    __pyx_t_9 = ((__pyx_v_j < (__pyx_v_N - 1)) != 0);
    if (!__pyx_t_9) {
      if (unlikely(__pyx_v_N == 0)) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        #ifdef WITH_THREAD
        PyGILState_Release(__pyx_gilstate_save);
        #endif
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) != (__pyx_v_N - 1)) != 0);
      __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":833
 * 
 *     if  j >= 0 and (j < N-1 or (j % N) != N-1 ):
 *         writer.writerows(rows[:((j+1) % N)])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = (__pyx_v_j + 1);
    if (unlikely(__pyx_v_N == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      #ifdef WITH_THREAD
      PyGILState_Release(__pyx_gilstate_save);
      #endif
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = __Pyx_PyList_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 = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_11));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
    __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __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_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_73create_hdf_rows_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_72create_hdf_rows_2d[] = " return a list of objects ready to be converted to rec-array format ";
static PyMethodDef __pyx_mdef_6pandas_3lib_73create_hdf_rows_2d = {__Pyx_NAMESTR("create_hdf_rows_2d"), (PyCFunction)__pyx_pw_6pandas_3lib_73create_hdf_rows_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_72create_hdf_rows_2d)};
static PyObject *__pyx_pw_6pandas_3lib_73create_hdf_rows_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indexer0 = 0;
  PyObject *__pyx_v_dtype = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_searchable = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_hdf_rows_2d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer0,&__pyx_n_s__dtype,&__pyx_n_s__mask,&__pyx_n_s__searchable,&__pyx_n_s__values,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__indexer0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_2d", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __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("create_hdf_rows_2d", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__searchable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_2d", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_2d", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_hdf_rows_2d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __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_indexer0 = ((PyArrayObject *)values[0]);
    __pyx_v_dtype = values[1];
    __pyx_v_mask = ((PyArrayObject *)values[2]);
    __pyx_v_searchable = ((PyArrayObject *)values[3]);
    __pyx_v_values = ((PyObject*)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_hdf_rows_2d", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.create_hdf_rows_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer0), __pyx_ptype_5numpy_ndarray, 1, "indexer0", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __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 = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_searchable), __pyx_ptype_5numpy_ndarray, 1, "searchable", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_72create_hdf_rows_2d(__pyx_self, __pyx_v_indexer0, __pyx_v_dtype, __pyx_v_mask, __pyx_v_searchable, __pyx_v_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":838
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_2d(ndarray indexer0,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=1] mask,
 */

static PyObject *__pyx_pf_6pandas_3lib_72create_hdf_rows_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer0, PyObject *__pyx_v_dtype, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_searchable, PyObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_l;
  int __pyx_v_b;
  int __pyx_v_n_indexer0;
  int __pyx_v_n_blocks;
  int __pyx_v_tup_size;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_v_v = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_searchable;
  __Pyx_Buffer __pyx_pybuffer_searchable;
  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;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_hdf_rows_2d", 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_pybuffer_searchable.pybuffer.buf = NULL;
  __pyx_pybuffer_searchable.refcount = 0;
  __pyx_pybuffernd_searchable.data = NULL;
  __pyx_pybuffernd_searchable.rcbuffer = &__pyx_pybuffer_searchable;
  {
    __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 = 838; __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_searchable.rcbuffer->pybuffer, (PyObject*)__pyx_v_searchable, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_searchable.diminfo[0].strides = __pyx_pybuffernd_searchable.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_searchable.diminfo[0].shape = __pyx_pybuffernd_searchable.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":851
 *         object v
 * 
 *     n_indexer0 = indexer0.shape[0]             # <<<<<<<<<<<<<<
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+1
 */
  __pyx_v_n_indexer0 = (__pyx_v_indexer0->dimensions[0]);

  /* "pandas/lib.pyx":852
 * 
 *     n_indexer0 = indexer0.shape[0]
 *     n_blocks   = len(values)             # <<<<<<<<<<<<<<
 *     tup_size   = n_blocks+1
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __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[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n_blocks = __pyx_t_1;

  /* "pandas/lib.pyx":853
 *     n_indexer0 = indexer0.shape[0]
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+1             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n_indexer0,dtype=dtype)
 */
  __pyx_v_tup_size = (__pyx_v_n_blocks + 1);

  /* "pandas/lib.pyx":855
 *     tup_size   = n_blocks+1
 * 
 *     result = np.empty(n_indexer0,dtype=dtype)             # <<<<<<<<<<<<<<
 *     l = 0
 *     for i in range(n_indexer0):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __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_indexer0); 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __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 = 855; __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_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __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 = 855; __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 = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":856
 * 
 *     result = np.empty(n_indexer0,dtype=dtype)
 *     l = 0             # <<<<<<<<<<<<<<
 *     for i in range(n_indexer0):
 * 
 */
  __pyx_v_l = 0;

  /* "pandas/lib.pyx":857
 *     result = np.empty(n_indexer0,dtype=dtype)
 *     l = 0
 *     for i in range(n_indexer0):             # <<<<<<<<<<<<<<
 * 
 *         if not mask[i]:
 */
  __pyx_t_6 = __pyx_v_n_indexer0;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "pandas/lib.pyx":859
 *     for i in range(n_indexer0):
 * 
 *         if not mask[i]:             # <<<<<<<<<<<<<<
 * 
 *             tup = PyTuple_New(tup_size)
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = ((!((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0)) != 0);
    if (__pyx_t_9) {

      /* "pandas/lib.pyx":861
 *         if not mask[i]:
 * 
 *             tup = PyTuple_New(tup_size)             # <<<<<<<<<<<<<<
 * 
 *             v  = indexer0[i]
 */
      __pyx_t_5 = ((PyObject *)PyTuple_New(__pyx_v_tup_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF(((PyObject *)__pyx_v_tup));
      __pyx_v_tup = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pandas/lib.pyx":863
 *             tup = PyTuple_New(tup_size)
 * 
 *             v  = indexer0[i]             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(tup, 0, v)
 *             Py_INCREF(v)
 */
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indexer0), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_v);
      __pyx_v_v = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/lib.pyx":864
 * 
 *             v  = indexer0[i]
 *             PyTuple_SET_ITEM(tup, 0, v)             # <<<<<<<<<<<<<<
 *             Py_INCREF(v)
 * 
 */
      PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), 0, __pyx_v_v);

      /* "pandas/lib.pyx":865
 *             v  = indexer0[i]
 *             PyTuple_SET_ITEM(tup, 0, v)
 *             Py_INCREF(v)             # <<<<<<<<<<<<<<
 * 
 *             for b in range(n_blocks):
 */
      Py_INCREF(__pyx_v_v);

      /* "pandas/lib.pyx":867
 *             Py_INCREF(v)
 * 
 *             for b in range(n_blocks):             # <<<<<<<<<<<<<<
 * 
 *                 v = values[b][i]
 */
      __pyx_t_10 = __pyx_v_n_blocks;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_v_b = __pyx_t_11;

        /* "pandas/lib.pyx":869
 *             for b in range(n_blocks):
 * 
 *                 v = values[b][i]             # <<<<<<<<<<<<<<
 *                 if searchable[b]:
 *                     v = v[0]
 */
        if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_5 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_values, __pyx_v_b), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_v_v);
        __pyx_v_v = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "pandas/lib.pyx":870
 * 
 *                 v = values[b][i]
 *                 if searchable[b]:             # <<<<<<<<<<<<<<
 *                     v = v[0]
 * 
 */
        __pyx_t_12 = __pyx_v_b;
        __pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_searchable.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_searchable.diminfo[0].strides)) != 0);
        if (__pyx_t_9) {

          /* "pandas/lib.pyx":871
 *                 v = values[b][i]
 *                 if searchable[b]:
 *                     v = v[0]             # <<<<<<<<<<<<<<
 * 
 *                 PyTuple_SET_ITEM(tup, b+1, v)
 */
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_v_v);
          __pyx_v_v = __pyx_t_5;
          __pyx_t_5 = 0;
          goto __pyx_L8;
        }
        __pyx_L8:;

        /* "pandas/lib.pyx":873
 *                     v = v[0]
 * 
 *                 PyTuple_SET_ITEM(tup, b+1, v)             # <<<<<<<<<<<<<<
 *                 Py_INCREF(v)
 * 
 */
        PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), (__pyx_v_b + 1), __pyx_v_v);

        /* "pandas/lib.pyx":874
 * 
 *                 PyTuple_SET_ITEM(tup, b+1, v)
 *                 Py_INCREF(v)             # <<<<<<<<<<<<<<
 * 
 *             result[l] = tup
 */
        Py_INCREF(__pyx_v_v);
      }

      /* "pandas/lib.pyx":876
 *                 Py_INCREF(v)
 * 
 *             result[l] = tup             # <<<<<<<<<<<<<<
 *             l += 1
 * 
 */
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_l, ((PyObject *)__pyx_v_tup), sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/lib.pyx":877
 * 
 *             result[l] = tup
 *             l += 1             # <<<<<<<<<<<<<<
 * 
 *     return result[0:l]
 */
      __pyx_v_l = (__pyx_v_l + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/lib.pyx":879
 *             l += 1
 * 
 *     return result[0:l]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_result), 0, __pyx_v_l, NULL, NULL, NULL, 1, 1, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __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_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_searchable.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.create_hdf_rows_2d", __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_searchable.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_75create_hdf_rows_3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_74create_hdf_rows_3d[] = " return a list of objects ready to be converted to rec-array format ";
static PyMethodDef __pyx_mdef_6pandas_3lib_75create_hdf_rows_3d = {__Pyx_NAMESTR("create_hdf_rows_3d"), (PyCFunction)__pyx_pw_6pandas_3lib_75create_hdf_rows_3d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_74create_hdf_rows_3d)};
static PyObject *__pyx_pw_6pandas_3lib_75create_hdf_rows_3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indexer0 = 0;
  PyArrayObject *__pyx_v_indexer1 = 0;
  PyObject *__pyx_v_dtype = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_searchable = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_hdf_rows_3d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer0,&__pyx_n_s__indexer1,&__pyx_n_s__dtype,&__pyx_n_s__mask,&__pyx_n_s__searchable,&__pyx_n_s__values,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__indexer0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 6, 6, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 6, 6, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 6, 6, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__searchable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 6, 6, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 6, 6, 5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_hdf_rows_3d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __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_indexer0 = ((PyArrayObject *)values[0]);
    __pyx_v_indexer1 = ((PyArrayObject *)values[1]);
    __pyx_v_dtype = values[2];
    __pyx_v_mask = ((PyArrayObject *)values[3]);
    __pyx_v_searchable = ((PyArrayObject *)values[4]);
    __pyx_v_values = ((PyObject*)values[5]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.create_hdf_rows_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer0), __pyx_ptype_5numpy_ndarray, 1, "indexer0", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer1), __pyx_ptype_5numpy_ndarray, 1, "indexer1", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __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 = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_searchable), __pyx_ptype_5numpy_ndarray, 1, "searchable", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_74create_hdf_rows_3d(__pyx_self, __pyx_v_indexer0, __pyx_v_indexer1, __pyx_v_dtype, __pyx_v_mask, __pyx_v_searchable, __pyx_v_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":883
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_3d(ndarray indexer0, ndarray indexer1,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=2] mask,
 */

static PyObject *__pyx_pf_6pandas_3lib_74create_hdf_rows_3d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer0, PyArrayObject *__pyx_v_indexer1, PyObject *__pyx_v_dtype, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_searchable, PyObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_l;
  int __pyx_v_b;
  int __pyx_v_n_indexer0;
  int __pyx_v_n_indexer1;
  int __pyx_v_n_blocks;
  int __pyx_v_tup_size;
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_searchable;
  __Pyx_Buffer __pyx_pybuffer_searchable;
  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;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_hdf_rows_3d", 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_pybuffer_searchable.pybuffer.buf = NULL;
  __pyx_pybuffer_searchable.refcount = 0;
  __pyx_pybuffernd_searchable.data = NULL;
  __pyx_pybuffernd_searchable.rcbuffer = &__pyx_pybuffer_searchable;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __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_searchable.rcbuffer->pybuffer, (PyObject*)__pyx_v_searchable, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_searchable.diminfo[0].strides = __pyx_pybuffernd_searchable.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_searchable.diminfo[0].shape = __pyx_pybuffernd_searchable.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":896
 *         ndarray result
 * 
 *     n_indexer0 = indexer0.shape[0]             # <<<<<<<<<<<<<<
 *     n_indexer1 = indexer1.shape[0]
 *     n_blocks   = len(values)
 */
  __pyx_v_n_indexer0 = (__pyx_v_indexer0->dimensions[0]);

  /* "pandas/lib.pyx":897
 * 
 *     n_indexer0 = indexer0.shape[0]
 *     n_indexer1 = indexer1.shape[0]             # <<<<<<<<<<<<<<
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+2
 */
  __pyx_v_n_indexer1 = (__pyx_v_indexer1->dimensions[0]);

  /* "pandas/lib.pyx":898
 *     n_indexer0 = indexer0.shape[0]
 *     n_indexer1 = indexer1.shape[0]
 *     n_blocks   = len(values)             # <<<<<<<<<<<<<<
 *     tup_size   = n_blocks+2
 *     result = np.empty(n_indexer0*n_indexer1,dtype=dtype)
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 898; __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[2]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n_blocks = __pyx_t_1;

  /* "pandas/lib.pyx":899
 *     n_indexer1 = indexer1.shape[0]
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+2             # <<<<<<<<<<<<<<
 *     result = np.empty(n_indexer0*n_indexer1,dtype=dtype)
 *     l = 0
 */
  __pyx_v_tup_size = (__pyx_v_n_blocks + 2);

  /* "pandas/lib.pyx":900
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+2
 *     result = np.empty(n_indexer0*n_indexer1,dtype=dtype)             # <<<<<<<<<<<<<<
 *     l = 0
 *     for i from 0 <= i < n_indexer0:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 900; __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_indexer0 * __pyx_v_n_indexer1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 900; __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 = 900; __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 = 900; __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_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 900; __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 = 900; __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 = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":901
 *     tup_size   = n_blocks+2
 *     result = np.empty(n_indexer0*n_indexer1,dtype=dtype)
 *     l = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n_indexer0:
 * 
 */
  __pyx_v_l = 0;

  /* "pandas/lib.pyx":902
 *     result = np.empty(n_indexer0*n_indexer1,dtype=dtype)
 *     l = 0
 *     for i from 0 <= i < n_indexer0:             # <<<<<<<<<<<<<<
 * 
 *         for j from 0 <= j < n_indexer1:
 */
  __pyx_t_6 = __pyx_v_n_indexer0;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {

    /* "pandas/lib.pyx":904
 *     for i from 0 <= i < n_indexer0:
 * 
 *         for j from 0 <= j < n_indexer1:             # <<<<<<<<<<<<<<
 * 
 *             if not mask[i, j]:
 */
    __pyx_t_7 = __pyx_v_n_indexer1;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {

      /* "pandas/lib.pyx":906
 *         for j from 0 <= j < n_indexer1:
 * 
 *             if not mask[i, j]:             # <<<<<<<<<<<<<<
 * 
 *                 tup = PyTuple_New(tup_size)
 */
      __pyx_t_8 = __pyx_v_i;
      __pyx_t_9 = __pyx_v_j;
      __pyx_t_10 = ((!((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0)) != 0);
      if (__pyx_t_10) {

        /* "pandas/lib.pyx":908
 *             if not mask[i, j]:
 * 
 *                 tup = PyTuple_New(tup_size)             # <<<<<<<<<<<<<<
 * 
 *                 v = indexer0[i]
 */
        __pyx_t_5 = ((PyObject *)PyTuple_New(__pyx_v_tup_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF(((PyObject *)__pyx_v_tup));
        __pyx_v_tup = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pandas/lib.pyx":910
 *                 tup = PyTuple_New(tup_size)
 * 
 *                 v = indexer0[i]             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(tup, 0, v)
 *                 Py_INCREF(v)
 */
        __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indexer0), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF(__pyx_v_v);
        __pyx_v_v = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "pandas/lib.pyx":911
 * 
 *                 v = indexer0[i]
 *                 PyTuple_SET_ITEM(tup, 0, v)             # <<<<<<<<<<<<<<
 *                 Py_INCREF(v)
 *                 v = indexer1[j]
 */
        PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), 0, __pyx_v_v);

        /* "pandas/lib.pyx":912
 *                 v = indexer0[i]
 *                 PyTuple_SET_ITEM(tup, 0, v)
 *                 Py_INCREF(v)             # <<<<<<<<<<<<<<
 *                 v = indexer1[j]
 *                 PyTuple_SET_ITEM(tup, 1, v)
 */
        Py_INCREF(__pyx_v_v);

        /* "pandas/lib.pyx":913
 *                 PyTuple_SET_ITEM(tup, 0, v)
 *                 Py_INCREF(v)
 *                 v = indexer1[j]             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(tup, 1, v)
 *                 Py_INCREF(v)
 */
        __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indexer1), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_v_v);
        __pyx_v_v = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "pandas/lib.pyx":914
 *                 Py_INCREF(v)
 *                 v = indexer1[j]
 *                 PyTuple_SET_ITEM(tup, 1, v)             # <<<<<<<<<<<<<<
 *                 Py_INCREF(v)
 * 
 */
        PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), 1, __pyx_v_v);

        /* "pandas/lib.pyx":915
 *                 v = indexer1[j]
 *                 PyTuple_SET_ITEM(tup, 1, v)
 *                 Py_INCREF(v)             # <<<<<<<<<<<<<<
 * 
 *                 for b from 0 <= b < n_blocks:
 */
        Py_INCREF(__pyx_v_v);

        /* "pandas/lib.pyx":917
 *                 Py_INCREF(v)
 * 
 *                 for b from 0 <= b < n_blocks:             # <<<<<<<<<<<<<<
 * 
 *                     v   = values[b][i, j]
 */
        __pyx_t_11 = __pyx_v_n_blocks;
        for (__pyx_v_b = 0; __pyx_v_b < __pyx_t_11; __pyx_v_b++) {

          /* "pandas/lib.pyx":919
 *                 for b from 0 <= b < n_blocks:
 * 
 *                     v   = values[b][i, j]             # <<<<<<<<<<<<<<
 *                     if searchable[b]:
 *                         v = v[0]
 */
          if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_5 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PyInt_FromLong(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 919; __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 = 919; __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);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_5 = 0;
          __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_GetItem(PyList_GET_ITEM(__pyx_v_values, __pyx_v_b), ((PyObject *)__pyx_t_4)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_v_v);
          __pyx_v_v = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "pandas/lib.pyx":920
 * 
 *                     v   = values[b][i, j]
 *                     if searchable[b]:             # <<<<<<<<<<<<<<
 *                         v = v[0]
 * 
 */
          __pyx_t_12 = __pyx_v_b;
          __pyx_t_10 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_searchable.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_searchable.diminfo[0].strides)) != 0);
          if (__pyx_t_10) {

            /* "pandas/lib.pyx":921
 *                     v   = values[b][i, j]
 *                     if searchable[b]:
 *                         v = v[0]             # <<<<<<<<<<<<<<
 * 
 *                     PyTuple_SET_ITEM(tup, b+2, v)
 */
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_v_v);
            __pyx_v_v = __pyx_t_2;
            __pyx_t_2 = 0;
            goto __pyx_L10;
          }
          __pyx_L10:;

          /* "pandas/lib.pyx":923
 *                         v = v[0]
 * 
 *                     PyTuple_SET_ITEM(tup, b+2, v)             # <<<<<<<<<<<<<<
 *                     Py_INCREF(v)
 * 
 */
          PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), (__pyx_v_b + 2), __pyx_v_v);

          /* "pandas/lib.pyx":924
 * 
 *                     PyTuple_SET_ITEM(tup, b+2, v)
 *                     Py_INCREF(v)             # <<<<<<<<<<<<<<
 * 
 *                 result[l] = tup
 */
          Py_INCREF(__pyx_v_v);
        }

        /* "pandas/lib.pyx":926
 *                     Py_INCREF(v)
 * 
 *                 result[l] = tup             # <<<<<<<<<<<<<<
 *                 l += 1
 * 
 */
        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_l, ((PyObject *)__pyx_v_tup), sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/lib.pyx":927
 * 
 *                 result[l] = tup
 *                 l += 1             # <<<<<<<<<<<<<<
 * 
 *     return result[0:l]
 */
        __pyx_v_l = (__pyx_v_l + 1);
        goto __pyx_L7;
      }
      __pyx_L7:;
    }
  }

  /* "pandas/lib.pyx":929
 *                 l += 1
 * 
 *     return result[0:l]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_result), 0, __pyx_v_l, NULL, NULL, NULL, 1, 1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 929; __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_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_searchable.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.create_hdf_rows_3d", __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_searchable.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_77create_hdf_rows_4d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_76create_hdf_rows_4d[] = " return a list of objects ready to be converted to rec-array format ";
static PyMethodDef __pyx_mdef_6pandas_3lib_77create_hdf_rows_4d = {__Pyx_NAMESTR("create_hdf_rows_4d"), (PyCFunction)__pyx_pw_6pandas_3lib_77create_hdf_rows_4d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_76create_hdf_rows_4d)};
static PyObject *__pyx_pw_6pandas_3lib_77create_hdf_rows_4d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indexer0 = 0;
  PyArrayObject *__pyx_v_indexer1 = 0;
  PyArrayObject *__pyx_v_indexer2 = 0;
  PyObject *__pyx_v_dtype = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_searchable = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_hdf_rows_4d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer0,&__pyx_n_s__indexer1,&__pyx_n_s__indexer2,&__pyx_n_s__dtype,&__pyx_n_s__mask,&__pyx_n_s__searchable,&__pyx_n_s__values,0};
    PyObject* values[7] = {0,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  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        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__indexer0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__searchable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, 5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, 6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_hdf_rows_4d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      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);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_indexer0 = ((PyArrayObject *)values[0]);
    __pyx_v_indexer1 = ((PyArrayObject *)values[1]);
    __pyx_v_indexer2 = ((PyArrayObject *)values[2]);
    __pyx_v_dtype = values[3];
    __pyx_v_mask = ((PyArrayObject *)values[4]);
    __pyx_v_searchable = ((PyArrayObject *)values[5]);
    __pyx_v_values = ((PyObject*)values[6]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_hdf_rows_4d", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.lib.create_hdf_rows_4d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer0), __pyx_ptype_5numpy_ndarray, 1, "indexer0", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer1), __pyx_ptype_5numpy_ndarray, 1, "indexer1", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer2), __pyx_ptype_5numpy_ndarray, 1, "indexer2", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __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 = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_searchable), __pyx_ptype_5numpy_ndarray, 1, "searchable", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_76create_hdf_rows_4d(__pyx_self, __pyx_v_indexer0, __pyx_v_indexer1, __pyx_v_indexer2, __pyx_v_dtype, __pyx_v_mask, __pyx_v_searchable, __pyx_v_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/lib.pyx":933
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_4d(ndarray indexer0, ndarray indexer1, ndarray indexer2,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=3] mask,
 */

static PyObject *__pyx_pf_6pandas_3lib_76create_hdf_rows_4d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer0, PyArrayObject *__pyx_v_indexer1, PyArrayObject *__pyx_v_indexer2, PyObject *__pyx_v_dtype, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_searchable, PyObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  int __pyx_v_l;
  int __pyx_v_b;
  int __pyx_v_n_indexer0;
  int __pyx_v_n_indexer1;
  int __pyx_v_n_indexer2;
  int __pyx_v_n_blocks;
  int __pyx_v_tup_size;
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_searchable;
  __Pyx_Buffer __pyx_pybuffer_searchable;
  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;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_hdf_rows_4d", 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_pybuffer_searchable.pybuffer.buf = NULL;
  __pyx_pybuffer_searchable.refcount = 0;
  __pyx_pybuffernd_searchable.data = NULL;
  __pyx_pybuffernd_searchable.rcbuffer = &__pyx_pybuffer_searchable;
  {
    __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, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __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_pybuffernd_mask.diminfo[2].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_mask.diminfo[2].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_searchable.rcbuffer->pybuffer, (PyObject*)__pyx_v_searchable, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_searchable.diminfo[0].strides = __pyx_pybuffernd_searchable.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_searchable.diminfo[0].shape = __pyx_pybuffernd_searchable.rcbuffer->pybuffer.shape[0];

  /* "pandas/lib.pyx":946
 *         ndarray result
 * 
 *     n_indexer0 = indexer0.shape[0]             # <<<<<<<<<<<<<<
 *     n_indexer1 = indexer1.shape[0]
 *     n_indexer2 = indexer2.shape[0]
 */
  __pyx_v_n_indexer0 = (__pyx_v_indexer0->dimensions[0]);

  /* "pandas/lib.pyx":947
 * 
 *     n_indexer0 = indexer0.shape[0]
 *     n_indexer1 = indexer1.shape[0]             # <<<<<<<<<<<<<<
 *     n_indexer2 = indexer2.shape[0]
 *     n_blocks   = len(values)
 */
  __pyx_v_n_indexer1 = (__pyx_v_indexer1->dimensions[0]);

  /* "pandas/lib.pyx":948
 *     n_indexer0 = indexer0.shape[0]
 *     n_indexer1 = indexer1.shape[0]
 *     n_indexer2 = indexer2.shape[0]             # <<<<<<<<<<<<<<
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+3
 */
  __pyx_v_n_indexer2 = (__pyx_v_indexer2->dimensions[0]);

  /* "pandas/lib.pyx":949
 *     n_indexer1 = indexer1.shape[0]
 *     n_indexer2 = indexer2.shape[0]
 *     n_blocks   = len(values)             # <<<<<<<<<<<<<<
 *     tup_size   = n_blocks+3
 *     result = np.empty(n_indexer0*n_indexer1*n_indexer2,dtype=dtype)
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 949; __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[2]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n_blocks = __pyx_t_1;

  /* "pandas/lib.pyx":950
 *     n_indexer2 = indexer2.shape[0]
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+3             # <<<<<<<<<<<<<<
 *     result = np.empty(n_indexer0*n_indexer1*n_indexer2,dtype=dtype)
 *     l = 0
 */
  __pyx_v_tup_size = (__pyx_v_n_blocks + 3);

  /* "pandas/lib.pyx":951
 *     n_blocks   = len(values)
 *     tup_size   = n_blocks+3
 *     result = np.empty(n_indexer0*n_indexer1*n_indexer2,dtype=dtype)             # <<<<<<<<<<<<<<
 *     l = 0
 *     for i from 0 <= i < n_indexer0:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 951; __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_indexer0 * __pyx_v_n_indexer1) * __pyx_v_n_indexer2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 951; __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 = 951; __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 = 951; __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_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 951; __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 = 951; __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 = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/lib.pyx":952
 *     tup_size   = n_blocks+3
 *     result = np.empty(n_indexer0*n_indexer1*n_indexer2,dtype=dtype)
 *     l = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n_indexer0:
 * 
 */
  __pyx_v_l = 0;

  /* "pandas/lib.pyx":953
 *     result = np.empty(n_indexer0*n_indexer1*n_indexer2,dtype=dtype)
 *     l = 0
 *     for i from 0 <= i < n_indexer0:             # <<<<<<<<<<<<<<
 * 
 *         for j from 0 <= j < n_indexer1:
 */
  __pyx_t_6 = __pyx_v_n_indexer0;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {

    /* "pandas/lib.pyx":955
 *     for i from 0 <= i < n_indexer0:
 * 
 *         for j from 0 <= j < n_indexer1:             # <<<<<<<<<<<<<<
 * 
 *             for k from 0 <= k < n_indexer2:
 */
    __pyx_t_7 = __pyx_v_n_indexer1;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {

      /* "pandas/lib.pyx":957
 *         for j from 0 <= j < n_indexer1:
 * 
 *             for k from 0 <= k < n_indexer2:             # <<<<<<<<<<<<<<
 * 
 *                 if not mask[i, j, k]:
 */
      __pyx_t_8 = __pyx_v_n_indexer2;
      for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_8; __pyx_v_k++) {

        /* "pandas/lib.pyx":959
 *             for k from 0 <= k < n_indexer2:
 * 
 *                 if not mask[i, j, k]:             # <<<<<<<<<<<<<<
 * 
 *                     tup = PyTuple_New(tup_size)
 */
        __pyx_t_9 = __pyx_v_i;
        __pyx_t_10 = __pyx_v_j;
        __pyx_t_11 = __pyx_v_k;
        __pyx_t_12 = ((!((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_mask.diminfo[1].strides, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[2].strides)) != 0)) != 0);
        if (__pyx_t_12) {

          /* "pandas/lib.pyx":961
 *                 if not mask[i, j, k]:
 * 
 *                     tup = PyTuple_New(tup_size)             # <<<<<<<<<<<<<<
 * 
 *                     v = indexer0[i]
 */
          __pyx_t_5 = ((PyObject *)PyTuple_New(__pyx_v_tup_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF(((PyObject *)__pyx_v_tup));
          __pyx_v_tup = ((PyObject*)__pyx_t_5);
          __pyx_t_5 = 0;

          /* "pandas/lib.pyx":963
 *                     tup = PyTuple_New(tup_size)
 * 
 *                     v = indexer0[i]             # <<<<<<<<<<<<<<
 *                     PyTuple_SET_ITEM(tup, 0, v)
 *                     Py_INCREF(v)
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indexer0), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF(__pyx_v_v);
          __pyx_v_v = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "pandas/lib.pyx":964
 * 
 *                     v = indexer0[i]
 *                     PyTuple_SET_ITEM(tup, 0, v)             # <<<<<<<<<<<<<<
 *                     Py_INCREF(v)
 *                     v = indexer1[j]
 */
          PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), 0, __pyx_v_v);

          /* "pandas/lib.pyx":965
 *                     v = indexer0[i]
 *                     PyTuple_SET_ITEM(tup, 0, v)
 *                     Py_INCREF(v)             # <<<<<<<<<<<<<<
 *                     v = indexer1[j]
 *                     PyTuple_SET_ITEM(tup, 1, v)
 */
          Py_INCREF(__pyx_v_v);

          /* "pandas/lib.pyx":966
 *                     PyTuple_SET_ITEM(tup, 0, v)
 *                     Py_INCREF(v)
 *                     v = indexer1[j]             # <<<<<<<<<<<<<<
 *                     PyTuple_SET_ITEM(tup, 1, v)
 *                     Py_INCREF(v)
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indexer1), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_v_v);
          __pyx_v_v = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "pandas/lib.pyx":967
 *                     Py_INCREF(v)
 *                     v = indexer1[j]
 *                     PyTuple_SET_ITEM(tup, 1, v)             # <<<<<<<<<<<<<<
 *                     Py_INCREF(v)
 *                     v = indexer2[k]
 */
          PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), 1, __pyx_v_v);

          /* "pandas/lib.pyx":968
 *                     v = indexer1[j]
 *                     PyTuple_SET_ITEM(tup, 1, v)
 *                     Py_INCREF(v)             # <<<<<<<<<<<<<<
 *                     v = indexer2[k]
 *                     PyTuple_SET_ITEM(tup, 2, v)
 */
          Py_INCREF(__pyx_v_v);

          /* "pandas/lib.pyx":969
 *                     PyTuple_SET_ITEM(tup, 1, v)
 *                     Py_INCREF(v)
 *                     v = indexer2[k]             # <<<<<<<<<<<<<<
 *                     PyTuple_SET_ITEM(tup, 2, v)
 *                     Py_INCREF(v)
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_indexer2), __pyx_v_k, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_v_v);
          __pyx_v_v = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "pandas/lib.pyx":970
 *                     Py_INCREF(v)
 *                     v = indexer2[k]
 *                     PyTuple_SET_ITEM(tup, 2, v)             # <<<<<<<<<<<<<<
 *                     Py_INCREF(v)
 * 
 */
          PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), 2, __pyx_v_v);

          /* "pandas/lib.pyx":971
 *                     v = indexer2[k]
 *                     PyTuple_SET_ITEM(tup, 2, v)
 *                     Py_INCREF(v)             # <<<<<<<<<<<<<<
 * 
 *                     for b from 0 <= b < n_blocks:
 */
          Py_INCREF(__pyx_v_v);

          /* "pandas/lib.pyx":973
 *                     Py_INCREF(v)
 * 
 *                     for b from 0 <= b < n_blocks:             # <<<<<<<<<<<<<<
 * 
 *                         v   = values[b][i, j, k]
 */
          __pyx_t_13 = __pyx_v_n_blocks;
          for (__pyx_v_b = 0; __pyx_v_b < __pyx_t_13; __pyx_v_b++) {

            /* "pandas/lib.pyx":975
 *                     for b from 0 <= b < n_blocks:
 * 
 *                         v   = values[b][i, j, k]             # <<<<<<<<<<<<<<
 *                         if searchable[b]:
 *                             v = v[0]
 */
            if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[2]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_5 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = PyInt_FromLong(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_4);
            __pyx_t_5 = 0;
            __pyx_t_2 = 0;
            __pyx_t_4 = 0;
            __pyx_t_4 = PyObject_GetItem(PyList_GET_ITEM(__pyx_v_values, __pyx_v_b), ((PyObject *)__pyx_t_3)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_v_v);
            __pyx_v_v = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "pandas/lib.pyx":976
 * 
 *                         v   = values[b][i, j, k]
 *                         if searchable[b]:             # <<<<<<<<<<<<<<
 *                             v = v[0]
 *                         PyTuple_SET_ITEM(tup, b+3, v)
 */
            __pyx_t_14 = __pyx_v_b;
            __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_searchable.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_searchable.diminfo[0].strides)) != 0);
            if (__pyx_t_12) {

              /* "pandas/lib.pyx":977
 *                         v   = values[b][i, j, k]
 *                         if searchable[b]:
 *                             v = v[0]             # <<<<<<<<<<<<<<
 *                         PyTuple_SET_ITEM(tup, b+3, v)
 *                         Py_INCREF(v)
 */
              __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_4) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_v_v);
              __pyx_v_v = __pyx_t_4;
              __pyx_t_4 = 0;
              goto __pyx_L12;
            }
            __pyx_L12:;

            /* "pandas/lib.pyx":978
 *                         if searchable[b]:
 *                             v = v[0]
 *                         PyTuple_SET_ITEM(tup, b+3, v)             # <<<<<<<<<<<<<<
 *                         Py_INCREF(v)
 * 
 */
            PyTuple_SET_ITEM(((PyObject *)__pyx_v_tup), (__pyx_v_b + 3), __pyx_v_v);

            /* "pandas/lib.pyx":979
 *                             v = v[0]
 *                         PyTuple_SET_ITEM(tup, b+3, v)
 *                         Py_INCREF(v)             # <<<<<<<<<<<<<<
 * 
 *                     result[l] = tup
 */
            Py_INCREF(__pyx_v_v);
          }

          /* "pandas/lib.pyx":981
 *                         Py_INCREF(v)
 * 
 *                     result[l] = tup             # <<<<<<<<<<<<<<
 *                     l += 1
 * 
 */
          if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_l, ((PyObject *)__pyx_v_tup), sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "pandas/lib.pyx":982
 * 
 *                     result[l] = tup
 *                     l += 1             # <<<<<<<<<<<<<<
 * 
 *     return result[0:l]
 */
          __pyx_v_l = (__pyx_v_l + 1);
          goto __pyx_L9;
        }
        __pyx_L9:;
      }
    }
  }

  /* "pandas/lib.pyx":984
 *                     l += 1
 * 
 *     return result[0:l]             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_result), 0, __pyx_v_l, NULL, NULL, NULL, 1, 1, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 984; __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_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_searchable.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.lib.create_hdf_rows_4d", __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_searchable.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_79arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_79arrmap = {__Pyx_NAMESTR("arrmap"), (PyCFunction)__pyx_pw_6pandas_3lib_79arrmap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_79arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 990; __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 = 990; __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 = 990; __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 = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_78arrmap(__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":990
 * 
 * @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_78arrmap(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 = 990; __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":991
 * @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":992
 * 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":994
 *     cdef int i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < length:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 994; __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 = 994; __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 = 994; __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 = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 994; __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 = 994; __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 = 994; __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 = 994; __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 = 994; __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":996
 *     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":997
 * 
 *     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 = (PyObject *) *__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 = 997; __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 = 997; __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":999
 *         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_81is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_81is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_3lib_81is_lexsorted, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_81is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_80is_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":1003
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */

static PyObject *__pyx_pf_6pandas_3lib_80is_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":1010
 *         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 = 1010; __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 = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nlevels = __pyx_t_1;

  /* "pandas/lib.pyx":1011
 * 
 *     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 = 1011; __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 = 1011; __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":1013
 *     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":1014
 * 
 *     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":1017
 *         # 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 = 1017; __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 = 1017; __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":1018
 * 
 *         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":1021
 *     # 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":1022
 * 
 *     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":1023
 *     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":1024
 *         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":1025
 *             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) != 0);
      if (__pyx_t_4) {

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

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

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

        /* "pandas/lib.pyx":1030
 *                 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 = 1030; __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":1031
 *             else:
 *                 return False
 *     free(vecs)             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
  free(__pyx_v_vecs);

  /* "pandas/lib.pyx":1032
 *                 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 = 1032; __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_83generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_82generate_bins_dt64[] = "\n    Int64 (datetime64) version of generic python version in groupby.py\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_83generate_bins_dt64 = {__Pyx_NAMESTR("generate_bins_dt64"), (PyCFunction)__pyx_pw_6pandas_3lib_83generate_bins_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_82generate_bins_dt64)};
static PyObject *__pyx_pw_6pandas_3lib_83generate_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1042; __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 = 1042; __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 = 1042; __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 = 1042; __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 = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_82generate_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":1042
 * @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_82generate_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 = 1042; __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 = 1042; __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":1051
 *         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 = 1051; __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 = 1051; __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":1053
 *         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 = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_lenidx = __pyx_t_3;

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

  /* "pandas/lib.pyx":1056
 *     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) != 0);
  if (!__pyx_t_2) {
    __pyx_t_4 = ((__pyx_v_lenbin <= 0) != 0);
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  if (__pyx_t_5) {

    /* "pandas/lib.pyx":1057
 * 
 *     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_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1057; __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 = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":1060
 * 
 *     # 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))) != 0);
  if (__pyx_t_5) {

    /* "pandas/lib.pyx":1061
 *     # 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_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1061; __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 = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/lib.pyx":1063
 *         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))) != 0);
  if (__pyx_t_5) {

    /* "pandas/lib.pyx":1064
 * 
 *     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_16), NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/lib.pyx":1066
 *         raise ValueError("Values falls after last bin")
 * 
 *     bins   = np.empty(lenbin - 1, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     j  = 0 # index into values
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1066; __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 = 1066; __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 = 1066; __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 = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1066; __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 = 1066; __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 = 1066; __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 = 1066; __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 = 1066; __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":1068
 *     bins   = np.empty(lenbin - 1, dtype=np.int64)
 * 
 *     j  = 0 # index into values             # <<<<<<<<<<<<<<
 *     bc = 0 # bin count
 * 
 */
  __pyx_v_j = 0;

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

  /* "pandas/lib.pyx":1072
 * 
 *     # 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":1073
 *     # 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":1074
 *     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":1077
 * 
 *         # 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) != 0);
      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) != 0);
        if (!__pyx_t_2) {

          /* "pandas/lib.pyx":1078
 *         # 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 != 0)) {
            __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) != 0);
            __pyx_t_24 = __pyx_t_4;
          } else {
            __pyx_t_24 = (__pyx_v_right_closed != 0);
          }
          __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":1079
 *         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":1081
 *             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":1082
 * 
 *         bins[bc] = j
 *         bc += 1             # <<<<<<<<<<<<<<
 * 
 *     return bins
 */
    __pyx_v_bc = (__pyx_v_bc + 1);
  }

  /* "pandas/lib.pyx":1084
 *         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_85row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_85row_bool_subset = {__Pyx_NAMESTR("row_bool_subset"), (PyCFunction)__pyx_pw_6pandas_3lib_85row_bool_subset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_85row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1091; __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 = 1091; __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 = 1091; __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 = 1091; __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 = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_84row_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":1091
 * @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_84row_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;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  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 = 1091; __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 = 1091; __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":1094
 *                     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":1097
 *         ndarray[float64_t, ndim=2] out
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     assert(n == len(mask))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1097; __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 = 1097; __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 = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    #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 = 1097; __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 = 1097; __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 = 1097; __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 = 1097; __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 = 1097; __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":1098
 * 
 *     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 = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!((__pyx_v_n == __pyx_t_7) != 0))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/lib.pyx":1100
 *     assert(n == len(mask))
 * 
 *     out = np.empty((mask.sum(), k), dtype=np.float64)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1100; __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 = 1100; __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 = 1100; __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 = 1100; __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 = 1100; __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 = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1100; __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 = 1100; __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 = 1100; __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 = 1100; __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 = 1100; __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":1102
 *     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":1103
 * 
 *     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)) != 0);
    if (__pyx_t_15) {

      /* "pandas/lib.pyx":1104
 *     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":1105
 *         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":1106
 *             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":1108
 *             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_87row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_87row_bool_subset_object = {__Pyx_NAMESTR("row_bool_subset_object"), (PyCFunction)__pyx_pw_6pandas_3lib_87row_bool_subset_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_87row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1112; __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 = 1112; __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 = 1112; __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 = 1112; __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 = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_86row_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":1112
 * @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_86row_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;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  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 = 1112; __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 = 1112; __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":1115
 *                            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":1118
 *         ndarray[object, ndim=2] out
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     assert(n == len(mask))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __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 = 1118; __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 = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    #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 = 1118; __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 = 1118; __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 = 1118; __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 = 1118; __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 = 1118; __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":1119
 * 
 *     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 = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!((__pyx_v_n == __pyx_t_7) != 0))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/lib.pyx":1121
 *     assert(n == len(mask))
 * 
 *     out = np.empty((mask.sum(), k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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 = 1121; __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":1123
 *     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":1124
 * 
 *     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)) != 0);
    if (__pyx_t_14) {

      /* "pandas/lib.pyx":1125
 *     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":1126
 *         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 = (PyObject *) *__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":1127
 *             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":1129
 *             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_89group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_89group_count = {__Pyx_NAMESTR("group_count"), (PyCFunction)__pyx_pw_6pandas_3lib_89group_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_89group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  Py_ssize_t __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 1132; __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 = 1132; __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 = 1132; __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 = 1132; __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 = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_88group_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":1132
 * 
 * 
 * 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_88group_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 = 1132; __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":1134
 * 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 = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1137
 *         ndarray[int64_t] counts
 * 
 *     counts = np.zeros(size, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         counts[values[i]] += 1
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1137; __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 = 1137; __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 = 1137; __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 = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1137; __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 = 1137; __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 = 1137; __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 = 1137; __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 = 1137; __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":1138
 * 
 *     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":1139
 *     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 = 1139; __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 = 1139; __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":1140
 *     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_91lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_91lookup_values = {__Pyx_NAMESTR("lookup_values"), (PyCFunction)__pyx_pw_6pandas_3lib_91lookup_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_91lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_mapping = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1142; __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 = 1142; __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 = 1142; __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 = 1142; __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 = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_90lookup_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":1142
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_90lookup_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 = 1142; __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":1144
 * 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 = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1146
 *         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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1146; __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 = 1146; __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 = 1146; __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 = 1146; __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 = 1146; __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 = 1146; __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":1147
 * 
 *     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":1148
 *     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 = 1148; __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 = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = (PyObject *) *__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 = 1148; __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, 1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "pandas/lib.pyx":1149
 *     for i in range(n):
 *         result[i] = mapping[values[i]]
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1149; __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 = 1149; __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 = 1149; __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_93count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_93count_level_1d = {__Pyx_NAMESTR("count_level_1d"), (PyCFunction)__pyx_pw_6pandas_3lib_93count_level_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_93count_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 1152; __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 = 1152; __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 = 1152; __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 = 1153; __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 = 1152; __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 = 1152; __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 = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_92count_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":1152
 * 
 * 
 * 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_92count_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;
  int __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 = 1152; __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 = 1152; __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":1158
 *         ndarray[int64_t] counts
 * 
 *     counts = np.zeros(max_bin, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     n = len(mask)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1158; __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 = 1158; __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 = 1158; __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 = 1158; __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 = 1158; __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 = 1158; __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 = 1158; __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 = 1158; __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":1160
 *     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 = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "pandas/lib.pyx":1162
 *     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":1163
 * 
 *     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 = 1163; __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)) != 0);
    if (__pyx_t_12) {

      /* "pandas/lib.pyx":1164
 *     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 = 1164; __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 = 1164; __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":1166
 *             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_95count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_95count_level_2d = {__Pyx_NAMESTR("count_level_2d"), (PyCFunction)__pyx_pw_6pandas_3lib_95count_level_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_95count_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 1169; __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 = 1169; __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 = 1169; __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 = 1170; __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 = 1169; __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 = 1169; __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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_94count_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":1169
 * 
 * 
 * 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_94count_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;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_int64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_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 = 1169; __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 = 1169; __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
 *         ndarray[int64_t, ndim=2] counts
 * 
 *     n, k = (<object> mask).shape             # <<<<<<<<<<<<<<
 *     counts = np.zeros((max_bin, k), dtype='i8')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1175; __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 = 1175; __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 = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    #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 = 1175; __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 = 1175; __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 = 1175; __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 = 1175; __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 = 1175; __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":1176
 * 
 *     n, k = (<object> mask).shape
 *     counts = np.zeros((max_bin, k), dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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 = 1176; __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":1178
 *     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":1179
 * 
 *     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":1180
 *     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 = 1180; __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)) != 0);
      if (__pyx_t_15) {

        /* "pandas/lib.pyx":1181
 *         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 = 1181; __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 = 1181; __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":1183
 *                 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) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 1187; __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":1187
 * 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
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

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

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

    /* "pandas/lib.pyx":1189
 *     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 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)); 
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    break;

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

    /* "pandas/lib.pyx":1191
 *             return isinstance(other, _PandasNull)
 *         elif op == 3: # !=
 *             return not isinstance(other, _PandasNull)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)); 
    __pyx_t_2 = __Pyx_PyBool_FromLong((!(__pyx_t_1 != 0))); 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_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    break;
    default:

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __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":1195
 *             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":1196
 * 
 *     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_97fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_96fast_zip_fillna[] = "\n    For zipping multiple ndarrays into an ndarray of tuples\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_97fast_zip_fillna = {__Pyx_NAMESTR("fast_zip_fillna"), (PyCFunction)__pyx_pw_6pandas_3lib_97fast_zip_fillna, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_96fast_zip_fillna)};
static PyObject *__pyx_pw_6pandas_3lib_97fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ndarrays = 0;
  PyObject *__pyx_v_fill_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_17;
    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 = 1200; __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 = 1200; __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 = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_96fast_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":1200
 * 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_96fast_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":1210
 *         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 = 1210; __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 = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "pandas/lib.pyx":1211
 * 
 *     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 = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1211; __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 = 1211; __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":1213
 *     n = len(ndarrays[0])
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     # initialize tuples on first pass
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1213; __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 = 1213; __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 = 1213; __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 = 1213; __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 = 1213; __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 = 1213; __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 = 1213; __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 = 1213; __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":1216
 * 
 *     # 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 = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1216; __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":1217
 *     # 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 = 1217; __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":1218
 *     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":1219
 *     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 = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/lib.pyx":1220
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *         tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
 * 
 *         if val != val:
 */
    __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1220; __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":1222
 *         tup = PyTuple_New(k)
 * 
 *         if val != val:             # <<<<<<<<<<<<<<
 *             val = fill_value
 * 
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_12) {

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

    /* "pandas/lib.pyx":1227
 *         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 = 1227; __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":1228
 *         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":1230
 *         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":1231
 * 
 *     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 = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_arr);
    __pyx_v_arr = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/lib.pyx":1232
 *     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_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_it));
    __pyx_v_it = ((PyArrayIterObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "pandas/lib.pyx":1233
 *         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 = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = ((__pyx_t_15 != __pyx_v_n) != 0);
    if (__pyx_t_12) {

      /* "pandas/lib.pyx":1234
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 *             raise ValueError('all arrays must be same length')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1234; __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[2]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

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

        /* "pandas/lib.pyx":1239
 *             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":1241
 *                 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 = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_5 = (PyObject *) *__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":1242
 * 
 *             PyTuple_SET_ITEM(result[i], j, val)
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyArray_ITER_NEXT(it)
 * 
 */
      Py_INCREF(__pyx_v_val);

      /* "pandas/lib.pyx":1243
 *             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":1245
 *             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_99duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_99duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pw_6pandas_3lib_99duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_99duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_take_last = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_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__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 = 1247; __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 = 1247; __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 = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_98duplicated(__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":1247
 *     return result
 * 
 * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_3lib_98duplicated(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;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  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 = 1247; __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":1250
 *     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 = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_seen = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

  /* "pandas/lib.pyx":1254
 * 
 *     n = len(values)
 *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     if take_last:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1254; __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 = 1254; __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 = 1254; __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 = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1254; __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 = 1254; __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 = 1254; __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 = 1254; __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 = 1254; __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":1256
 *     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 = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {

    /* "pandas/lib.pyx":1257
 * 
 *     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":1258
 *     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 = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_6 = (PyObject *) *__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":1260
 *             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 = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = (__pyx_t_8 != 0);
      if (__pyx_t_10) {

        /* "pandas/lib.pyx":1261
 * 
 *             if row in seen:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen[row] = None
 */
        __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 = 1261; __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) = 1;
        goto __pyx_L6;
      }
      /*else*/ {

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

        /* "pandas/lib.pyx":1264
 *             else:
 *                 seen[row] = None
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 *     else:
 *         for i from 0 <= i < n:
 */
        __pyx_t_12 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_12 < 0) {
          __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      }
      __pyx_L6:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/lib.pyx":1266
 *                 result[i] = 0
 *     else:
 *         for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *             row = values[i]
 *             if row in seen:
 */
    __pyx_t_13 = __pyx_v_n;
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_13; __pyx_v_i++) {

      /* "pandas/lib.pyx":1267
 *     else:
 *         for i from 0 <= i < n:
 *             row = values[i]             # <<<<<<<<<<<<<<
 *             if row in seen:
 *                 result[i] = 1
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_14 >= __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 = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __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":1268
 *         for i from 0 <= i < n:
 *             row = values[i]
 *             if row in seen:             # <<<<<<<<<<<<<<
 *                 result[i] = 1
 *             else:
 */
      __pyx_t_10 = (__Pyx_PyDict_Contains(__pyx_v_row, ((PyObject *)__pyx_v_seen), Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = (__pyx_t_10 != 0);
      if (__pyx_t_8) {

        /* "pandas/lib.pyx":1269
 *             row = values[i]
 *             if row in seen:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen[row] = None
 */
        __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 = 1269; __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) = 1;
        goto __pyx_L9;
      }
      /*else*/ {

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

        /* "pandas/lib.pyx":1272
 *             else:
 *                 seen[row] = None
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_16 >= __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 = 1272; __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) = 0;
      }
      __pyx_L9:;
    }
  }
  __pyx_L3:;

  /* "pandas/lib.pyx":1274
 *                 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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1274; __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 = 1274; __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 = 1274; __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_101generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_101generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pw_6pandas_3lib_101generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_101generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_ngroups;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 1276; __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 = 1276; __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 = 1276; __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 = 1276; __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 = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_100generate_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":1276
 *     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_100generate_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 = 1276; __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":1282
 *         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 = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/lib.pyx":1284
 *     n = len(labels)
 * 
 *     starts = np.zeros(ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     ends = np.zeros(ngroups, dtype=np.int64)
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1284; __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 = 1284; __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 = 1284; __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 = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1284; __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 = 1284; __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 = 1284; __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 = 1284; __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 = 1284; __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":1285
 * 
 *     starts = np.zeros(ngroups, dtype=np.int64)
 *     ends = np.zeros(ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     start = 0
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1285; __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 = 1285; __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 = 1285; __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 = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1285; __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 = 1285; __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 = 1285; __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":1287
 *     ends = np.zeros(ngroups, dtype=np.int64)
 * 
 *     start = 0             # <<<<<<<<<<<<<<
 *     group_size = 0
 *     for i in range(n):
 */
  __pyx_v_start = 0;

  /* "pandas/lib.pyx":1288
 * 
 *     start = 0
 *     group_size = 0             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         group_size += 1
 */
  __pyx_v_group_size = 0;

  /* "pandas/lib.pyx":1289
 *     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":1290
 *     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":1291
 *     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 = 1291; __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":1292
 *         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)) != 0);
    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 = 1292; __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))) != 0);
      __pyx_t_17 = __pyx_t_16;
    } else {
      __pyx_t_17 = __pyx_t_14;
    }
    if (__pyx_t_17) {

      /* "pandas/lib.pyx":1293
 *         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 = 1293; __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":1294
 *         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 = 1294; __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, 1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/lib.pyx":1295
 *             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":1296
 *             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":1298
 *             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 = 1298; __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_103indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_103indices_fast = {__Pyx_NAMESTR("indices_fast"), (PyCFunction)__pyx_pw_6pandas_3lib_103indices_fast, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_103indices_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 1301; __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 = 1301; __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 = 1301; __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 = 1301; __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 = 1301; __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 = 1301; __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 = 1301; __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 = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_102indices_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":1301
 * 
 * 
 * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
 *                  list sorted_labels):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_102indices_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 = 1301; __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":1304
 *                  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 = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

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

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

  /* "pandas/lib.pyx":1310
 *     k = len(keys)
 * 
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_3 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_3) {

    /* "pandas/lib.pyx":1311
 * 
 *     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":1313
 *         return result
 * 
 *     start = 0             # <<<<<<<<<<<<<<
 *     cur = labels[0]
 *     for i in range(1, n):
 */
  __pyx_v_start = 0;

  /* "pandas/lib.pyx":1314
 * 
 *     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 = 1314; __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":1315
 *     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":1316
 *     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 = 1316; __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":1318
 *         lab = labels[i]
 * 
 *         if lab != cur:             # <<<<<<<<<<<<<<
 *             if lab != -1:
 *                 tup = PyTuple_New(k)
 */
    __pyx_t_3 = ((__pyx_v_lab != __pyx_v_cur) != 0);
    if (__pyx_t_3) {

      /* "pandas/lib.pyx":1319
 * 
 *         if lab != cur:
 *             if lab != -1:             # <<<<<<<<<<<<<<
 *                 tup = PyTuple_New(k)
 *                 for j in range(k):
 */
      __pyx_t_3 = ((__pyx_v_lab != -1) != 0);
      if (__pyx_t_3) {

        /* "pandas/lib.pyx":1320
 *         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 = 1320; __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":1321
 *             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":1322
 *                 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 = 1322; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1322; __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 = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "pandas/lib.pyx":1323
 *                 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 = 1323; __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, 1, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1323; __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, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1323; __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 = 1322; __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":1324
 *                     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":1325
 *                                             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":1327
 *                     Py_INCREF(val)
 * 
 *                 result[tup] = index[start:i]             # <<<<<<<<<<<<<<
 *             start = i
 *         cur = lab
 */
        __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_index, __pyx_v_start, __pyx_v_i, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1327; __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 = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "pandas/lib.pyx":1328
 * 
 *                 result[tup] = index[start:i]
 *             start = i             # <<<<<<<<<<<<<<
 *         cur = lab
 * 
 */
      __pyx_v_start = __pyx_v_i;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/lib.pyx":1329
 *                 result[tup] = index[start:i]
 *             start = i
 *         cur = lab             # <<<<<<<<<<<<<<
 * 
 *     tup = PyTuple_New(k)
 */
    __pyx_v_cur = __pyx_v_lab;
  }

  /* "pandas/lib.pyx":1331
 *         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 = 1331; __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":1332
 * 
 *     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":1333
 *     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 = 1333; __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, 1, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1333; __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 = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pandas/lib.pyx":1334
 *     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 = 1334; __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, 1, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1334; __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, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1334; __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 = 1333; __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":1335
 *         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":1336
 *                                 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":1337
 *         PyTuple_SET_ITEM(tup, j, val)
 *         Py_INCREF(val)
 *     result[tup] = index[start:]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_index, __pyx_v_start, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1337; __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 = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pandas/lib.pyx":1339
 *     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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":15
 *         bint can_set_name
 * 
 *     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":16
 * 
 *     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 = 15; __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 = 15; __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 = 15; __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":15
 *         bint can_set_name
 * 
 *     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;
  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":17
 *     def __init__(self, object arr, object f, axis=1, dummy=None,
 *                  labels=None):
 *         n, k = arr.shape             # <<<<<<<<<<<<<<
 * 
 *         if axis == 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __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 = 17; __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 = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    #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 = 17; __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 = 17; __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 = 17; __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":19
 *         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 = 19; __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 = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/reduce.pyx":20
 * 
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:             # <<<<<<<<<<<<<<
 *                 arr = arr.copy('F')
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_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 = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = ((!__pyx_t_6) != 0);
    if (__pyx_t_7) {

      /* "pandas/src/reduce.pyx":21
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:
 *                 arr = arr.copy('F')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = k
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_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":23
 *                 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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->nresults = __pyx_t_8;

    /* "pandas/src/reduce.pyx":24
 * 
 *             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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->chunksize = __pyx_t_8;

    /* "pandas/src/reduce.pyx":25
 *             self.nresults = k
 *             self.chunksize = n
 *             self.increment = n * arr.dtype.itemsize             # <<<<<<<<<<<<<<
 *         else:
 *             if not arr.flags.c_contiguous:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_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 = 25; __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 = 25; __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":27
 *             self.increment = n * arr.dtype.itemsize
 *         else:
 *             if not arr.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *                 arr = arr.copy('C')
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __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 = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((!__pyx_t_7) != 0);
    if (__pyx_t_6) {

      /* "pandas/src/reduce.pyx":28
 *         else:
 *             if not arr.flags.c_contiguous:
 *                 arr = arr.copy('C')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = n
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__copy); 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_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_21), NULL); 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_DECREF(__pyx_v_arr);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "pandas/src/reduce.pyx":30
 *                 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 = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->nresults = __pyx_t_8;

    /* "pandas/src/reduce.pyx":31
 * 
 *             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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->chunksize = __pyx_t_8;

    /* "pandas/src/reduce.pyx":32
 *             self.nresults = n
 *             self.chunksize = k
 *             self.increment = k * arr.dtype.itemsize             # <<<<<<<<<<<<<<
 * 
 *         self.f = f
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __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 = 32; __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 = 32; __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":34
 *             self.increment = k * arr.dtype.itemsize
 * 
 *         self.f = f             # <<<<<<<<<<<<<<
 *         self.arr = arr
 *         self.dummy = self._check_dummy(dummy)
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "pandas/src/reduce.pyx":35
 * 
 *         self.f = f
 *         self.arr = arr             # <<<<<<<<<<<<<<
 *         self.dummy = self._check_dummy(dummy)
 *         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":36
 *         self.f = f
 *         self.arr = arr
 *         self.dummy = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 *         self.labels = labels
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __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 = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":37
 *         self.arr = arr
 *         self.dummy = self._check_dummy(dummy)
 *         self.labels = labels             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
  __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;

  __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_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":39
 *         self.labels = labels
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __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 = 39; __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_r = NULL;
  __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;
  Py_ssize_t __pyx_t_7;
  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":40
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 *             self.can_set_name = 0
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":41
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *             self.can_set_name = 0
 *         else:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __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 = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_dummy);
    __pyx_v_dummy = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/reduce.pyx":42
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 *             self.can_set_name = 0             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __pyx_v_self->can_set_name = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":44
 *             self.can_set_name = 0
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             if len(dummy) != self.chunksize:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/reduce.pyx":45
 *         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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __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[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/reduce.pyx":46
 *             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_7 = PyObject_Length(__pyx_v_dummy); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_7 != __pyx_v_self->chunksize) != 0);
    if (__pyx_t_2) {

      /* "pandas/src/reduce.pyx":48
 *             if len(dummy) != self.chunksize:
 *                 raise ValueError('Dummy array must be length %d' %
 *                                  self.chunksize)             # <<<<<<<<<<<<<<
 *             self.can_set_name = type(dummy) != np.ndarray
 * 
 */
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/src/reduce.pyx":49
 *                 raise ValueError('Dummy array must be length %d' %
 *                                  self.chunksize)
 *             self.can_set_name = type(dummy) != np.ndarray             # <<<<<<<<<<<<<<
 * 
 *         return dummy
 */
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dummy)), ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->can_set_name = __pyx_t_2;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":51
 *             self.can_set_name = type(dummy) != np.ndarray
 * 
 *         return dummy             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dummy);
  __pyx_r = __pyx_v_dummy;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_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":53
 *         return dummy
 * 
 *     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;
  PyArrayIterObject *__pyx_v_it = 0;
  PyObject *__pyx_v_res = 0;
  int __pyx_v_set_label;
  PyArrayObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__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;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result", 0);

  /* "pandas/src/reduce.pyx":60
 *             flatiter it
 *             object res
 *             bint set_label = 0             # <<<<<<<<<<<<<<
 *             ndarray labels
 * 
 */
  __pyx_v_set_label = 0;

  /* "pandas/src/reduce.pyx":63
 *             ndarray labels
 * 
 *         arr = self.arr             # <<<<<<<<<<<<<<
 *         chunk = self.dummy
 * 
 */
  if (!(likely(((__pyx_v_self->arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __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":64
 * 
 *         arr = self.arr
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 * 
 *         dummy_buf = chunk.data
 */
  if (!(likely(((__pyx_v_self->dummy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->dummy, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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":66
 *         chunk = self.dummy
 * 
 *         dummy_buf = chunk.data             # <<<<<<<<<<<<<<
 *         chunk.data = arr.data
 * 
 */
  __pyx_t_1 = __pyx_v_chunk->data;
  __pyx_v_dummy_buf = __pyx_t_1;

  /* "pandas/src/reduce.pyx":67
 * 
 *         dummy_buf = chunk.data
 *         chunk.data = arr.data             # <<<<<<<<<<<<<<
 * 
 *         set_label = self.labels is not None and self.can_set_name
 */
  __pyx_t_1 = __pyx_v_arr->data;
  __pyx_v_chunk->data = __pyx_t_1;

  /* "pandas/src/reduce.pyx":69
 *         chunk.data = arr.data
 * 
 *         set_label = self.labels is not None and self.can_set_name             # <<<<<<<<<<<<<<
 *         if set_label:
 *             labels = self.labels
 */
  __pyx_t_2 = (__pyx_v_self->labels != Py_None);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_self->can_set_name;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  __pyx_v_set_label = __pyx_t_3;

  /* "pandas/src/reduce.pyx":70
 * 
 *         set_label = self.labels is not None and self.can_set_name
 *         if set_label:             # <<<<<<<<<<<<<<
 *             labels = self.labels
 * 
 */
  __pyx_t_3 = (__pyx_v_set_label != 0);
  if (__pyx_t_3) {

    /* "pandas/src/reduce.pyx":71
 *         set_label = self.labels is not None and self.can_set_name
 *         if set_label:
 *             labels = self.labels             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_self->labels);
    __pyx_v_labels = ((PyArrayObject *)__pyx_v_self->labels);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":73
 *             labels = self.labels
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(self.nresults):
 *                 if set_label:
 */
  /*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":74
 * 
 *         try:
 *             for i in range(self.nresults):             # <<<<<<<<<<<<<<
 *                 if set_label:
 *                     chunk.name = util.get_value_at(labels, i)
 */
        __pyx_t_7 = __pyx_v_self->nresults;
        for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
          __pyx_v_i = __pyx_t_8;

          /* "pandas/src/reduce.pyx":75
 *         try:
 *             for i in range(self.nresults):
 *                 if set_label:             # <<<<<<<<<<<<<<
 *                     chunk.name = util.get_value_at(labels, i)
 * 
 */
          __pyx_t_3 = (__pyx_v_set_label != 0);
          if (__pyx_t_3) {

            /* "pandas/src/reduce.pyx":76
 *             for i in range(self.nresults):
 *                 if set_label:
 *                     chunk.name = util.get_value_at(labels, i)             # <<<<<<<<<<<<<<
 * 
 *                 res = self.f(chunk)
 */
            if (unlikely(!__pyx_v_labels)) { __Pyx_RaiseUnboundLocalError("labels"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L7_error;} }
            __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = __pyx_f_4util_get_value_at(__pyx_v_labels, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_chunk), __pyx_n_s__name, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            goto __pyx_L17;
          }
          __pyx_L17:;

          /* "pandas/src/reduce.pyx":78
 *                     chunk.name = util.get_value_at(labels, i)
 * 
 *                 res = self.f(chunk)             # <<<<<<<<<<<<<<
 *                 if i == 0:
 *                     result = self._get_result_array(res)
 */
          __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L7_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 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L7_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;

          /* "pandas/src/reduce.pyx":79
 * 
 *                 res = self.f(chunk)
 *                 if i == 0:             # <<<<<<<<<<<<<<
 *                     result = self._get_result_array(res)
 *                     it = <flatiter> PyArray_IterNew(result)
 */
          __pyx_t_3 = ((__pyx_v_i == 0) != 0);
          if (__pyx_t_3) {

            /* "pandas/src/reduce.pyx":80
 *                 res = self.f(chunk)
 *                 if i == 0:
 *                     result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                     it = <flatiter> PyArray_IterNew(result)
 * 
 */
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_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_11 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
            if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_XDECREF(((PyObject *)__pyx_v_result));
            __pyx_v_result = ((PyArrayObject *)__pyx_t_11);
            __pyx_t_11 = 0;

            /* "pandas/src/reduce.pyx":81
 *                 if i == 0:
 *                     result = self._get_result_array(res)
 *                     it = <flatiter> PyArray_IterNew(result)             # <<<<<<<<<<<<<<
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 */
            __pyx_t_11 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_10 = __pyx_t_11;
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(((PyObject *)__pyx_v_it));
            __pyx_v_it = ((PyArrayIterObject *)__pyx_t_10);
            __pyx_t_10 = 0;
            goto __pyx_L18;
          }
          __pyx_L18:;

          /* "pandas/src/reduce.pyx":83
 *                     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 = 83; __pyx_clineno = __LINE__; goto __pyx_L7_error;} }
          if (unlikely(!__pyx_v_it)) { __Pyx_RaiseUnboundLocalError("it"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L7_error;} }
          PyArray_SETITEM(__pyx_v_result, PyArray_ITER_DATA(__pyx_v_it), __pyx_v_res);

          /* "pandas/src/reduce.pyx":84
 * 
 *                 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":85
 *                 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_L14_try_end;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "pandas/src/reduce.pyx":86
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:             # <<<<<<<<<<<<<<
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)
 */
      __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_12) {
        __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __pyx_v_e = __pyx_t_11;

        /* "pandas/src/reduce.pyx":87
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:
 *             if hasattr(e, 'args'):             # <<<<<<<<<<<<<<
 *                 e.args = e.args + (i,)
 *             raise
 */
        __pyx_t_3 = PyObject_HasAttr(__pyx_v_e, ((PyObject *)__pyx_n_s__args)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
        __pyx_t_2 = (__pyx_t_3 != 0);
        if (__pyx_t_2) {

          /* "pandas/src/reduce.pyx":88
 *         except Exception, e:
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s__args); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          __pyx_t_14 = 0;
          __pyx_t_14 = PyNumber_Add(__pyx_t_13, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s__args, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L21;
        }
        __pyx_L21:;

        /* "pandas/src/reduce.pyx":89
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             # so we don't free the wrong memory
 */
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_9);
        __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_9);
        __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_9 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L8_exception_handled;
      }
      __pyx_L9_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_L5;
      __pyx_L8_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_L14_try_end:;
    }
  }

  /* "pandas/src/reduce.pyx":92
 *         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_L6;
    __pyx_L5: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L6;
    }
    __pyx_L6:;
    __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":94
 *             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 = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__object_); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":95
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __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_9 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L23;
  }
  __pyx_L23:;

  /* "pandas/src/reduce.pyx":97
 *             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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __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((PyObject *)__pyx_v_labels);
  __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":99
 *         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;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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":100
 * 
 *     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":101
 *     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 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); 
      if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":102
 *         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 = PyList_Check(__pyx_v_res); 
      if ((__pyx_t_4 != 0)) {
        __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_6 = __pyx_v_self->dummy;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = (__pyx_t_4 != 0);
      }
      if (unlikely(!((!__pyx_t_9) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":104
 *             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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->nresults); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 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 = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __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_6)); __pyx_t_6 = 0;
      __pyx_v_result = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "pandas/src/reduce.pyx":105
 * 
 *             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, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __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_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "pandas/src/reduce.pyx":106
 *             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_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/src/reduce.pyx":107
 *             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_26), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __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 = 107; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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":108
 *         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_6);
  __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 122; __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 = 122; __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 = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __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 = 122; __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":122
 *         object arr, index, dummy, f, bins
 * 
 *     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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_series);

  /* "pandas/src/reduce.pyx":123
 * 
 *     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 = 123; __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 = 123; __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":125
 *         n = len(series)
 * 
 *         self.bins = bins             # <<<<<<<<<<<<<<
 *         self.f = f
 *         if not series.flags.c_contiguous:
 */
  __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":126
 * 
 *         self.bins = bins
 *         self.f = f             # <<<<<<<<<<<<<<
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "pandas/src/reduce.pyx":127
 *         self.bins = bins
 *         self.f = f
 *         if not series.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             series = series.copy('C')
 *         self.arr = series
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/src/reduce.pyx":128
 *         self.f = f
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = series
 *         self.index = series.index
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_series);
    __pyx_v_series = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":129
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')
 *         self.arr = series             # <<<<<<<<<<<<<<
 *         self.index = series.index
 * 
 */
  __Pyx_INCREF(__pyx_v_series);
  __Pyx_GIVEREF(__pyx_v_series);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_series;

  /* "pandas/src/reduce.pyx":130
 *             series = series.copy('C')
 *         self.arr = series
 *         self.index = series.index             # <<<<<<<<<<<<<<
 * 
 *         self.dummy = self._check_dummy(dummy)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __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":132
 *         self.index = series.index
 * 
 *         self.dummy = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 *         self.passed_dummy = dummy is not None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":133
 * 
 *         self.dummy = 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":136
 * 
 *         # 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 = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (__pyx_t_1 > 0);
  if (__pyx_t_5) {
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_bins, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __pyx_t_4;
  } else {
    __pyx_t_7 = __pyx_t_5;
  }
  if (__pyx_t_7) {

    /* "pandas/src/reduce.pyx":137
 *         # 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 = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->ngroups = __pyx_t_1;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":139
 *             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 = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->ngroups = (__pyx_t_1 + 1);
  }
  __pyx_L4:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_series);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":141
 *             self.ngroups = len(bins) + 1
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __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 = 141; __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_r = NULL;
  __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;
  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":142
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":143
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_28), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __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_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_dummy);
    __pyx_v_dummy = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":145
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/reduce.pyx":146
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __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 = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/reduce.pyx":147
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:             # <<<<<<<<<<<<<<
 *                 dummy = dummy.copy()
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__flags); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = ((!__pyx_t_2) != 0);
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":148
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()             # <<<<<<<<<<<<<<
 * 
 *         return dummy
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_dummy);
      __pyx_v_dummy = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":150
 *                 dummy = dummy.copy()
 * 
 *         return dummy             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dummy);
  __pyx_r = __pyx_v_dummy;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_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":152
 *         return dummy
 * 
 *     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;
  PyObject *__pyx_v_chunk = 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;
  __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":158
 *             Py_ssize_t i, n, group_size
 *             object res, chunk
 *             bint initialized = 0             # <<<<<<<<<<<<<<
 *             Slider vslider, islider
 *             object gin
 */
  __pyx_v_initialized = 0;

  /* "pandas/src/reduce.pyx":162
 *             object gin
 * 
 *         counts = np.zeros(self.ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *         if self.ngroups > 1:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __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 = 162; __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 = 162; __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 = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __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 = 162; __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 = 162; __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 = 162; __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 = 162; __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":164
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 * 
 *         if self.ngroups > 1:             # <<<<<<<<<<<<<<
 *             counts[0] = self.bins[0]
 *             for i in range(1, self.ngroups):
 */
  __pyx_t_11 = ((__pyx_v_self->ngroups > 1) != 0);
  if (__pyx_t_11) {

    /* "pandas/src/reduce.pyx":165
 * 
 *         if self.ngroups > 1:
 *             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, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __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 = 165; __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 = 165; __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":166
 *         if self.ngroups > 1:
 *             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":167
 *             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)) != 0);
      if (__pyx_t_11) {

        /* "pandas/src/reduce.pyx":168
 *             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 = 168; __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 = 168; __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, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __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 = 168; __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 = 168; __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":170
 *                     counts[i] = len(self.arr) - self.bins[i-1]
 *                 else:
 *                     counts[i] = self.bins[i] - self.bins[i-1]             # <<<<<<<<<<<<<<
 * 
 *         chunk = self.dummy
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __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, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __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 = 170; __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 = 170; __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 = 170; __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":172
 *                     counts[i] = self.bins[i] - self.bins[i-1]
 * 
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 *         group_size = 0
 *         n = len(self.arr)
 */
  __pyx_t_5 = __pyx_v_self->dummy;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_v_chunk = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/reduce.pyx":173
 * 
 *         chunk = self.dummy
 *         group_size = 0             # <<<<<<<<<<<<<<
 *         n = len(self.arr)
 * 
 */
  __pyx_v_group_size = 0;

  /* "pandas/src/reduce.pyx":174
 *         chunk = self.dummy
 *         group_size = 0
 *         n = len(self.arr)             # <<<<<<<<<<<<<<
 * 
 *         vslider = Slider(self.arr, self.dummy)
 */
  __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 = 174; __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":176
 *         n = len(self.arr)
 * 
 *         vslider = Slider(self.arr, self.dummy)             # <<<<<<<<<<<<<<
 *         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 = 176; __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);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->dummy);
  __Pyx_GIVEREF(__pyx_v_self->dummy);
  __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 = 176; __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":177
 * 
 *         vslider = Slider(self.arr, self.dummy)
 *         islider = Slider(self.index, self.dummy.index)             # <<<<<<<<<<<<<<
 * 
 *         gin = self.dummy.index._engine
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->index);
  __Pyx_GIVEREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __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 = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":179
 *         islider = Slider(self.index, self.dummy.index)
 * 
 *         gin = self.dummy.index._engine             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s___engine); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_gin = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/reduce.pyx":181
 *         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":182
 * 
 *         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":183
 *         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 = 183; __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":185
 *                 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 = 185; __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":186
 * 
 *                 islider.set_length(group_size)
 *                 vslider.set_length(group_size)             # <<<<<<<<<<<<<<
 * 
 *                 res = self.f(chunk)
 */
          __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 = 186; __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":188
 *                 vslider.set_length(group_size)
 * 
 *                 res = self.f(chunk)             # <<<<<<<<<<<<<<
 * 
 *                 if not initialized:
 */
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_chunk);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chunk);
          __Pyx_GIVEREF(__pyx_v_chunk);
          __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 = 188; __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":190
 *                 res = self.f(chunk)
 * 
 *                 if not initialized:             # <<<<<<<<<<<<<<
 *                     result = self._get_result_array(res)
 *                     initialized = 1
 */
          __pyx_t_11 = ((!(__pyx_v_initialized != 0)) != 0);
          if (__pyx_t_11) {

            /* "pandas/src/reduce.pyx":191
 * 
 *                 if not initialized:
 *                     result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                     initialized = 1
 * 
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __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 = 191; __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 = 191; __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 = 191; __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":192
 *                 if not initialized:
 *                     result = self._get_result_array(res)
 *                     initialized = 1             # <<<<<<<<<<<<<<
 * 
 *                 util.assign_value_1d(result, i, res)
 */
            __pyx_v_initialized = 1;
            goto __pyx_L20;
          }
          __pyx_L20:;

          /* "pandas/src/reduce.pyx":194
 *                     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 = 194; __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 = 194; __pyx_clineno = __LINE__; goto __pyx_L10_error;}

          /* "pandas/src/reduce.pyx":196
 *                 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 = 196; __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":197
 * 
 *                 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 = 197; __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":199
 *                 vslider.advance(group_size)
 * 
 *                 gin.clear_mapping()             # <<<<<<<<<<<<<<
 *         except:
 *             raise
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __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 = 199; __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":200
 * 
 *                 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 = 200; __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":201
 *                 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 = 201; __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":204
 *         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 = 204; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/src/reduce.pyx":205
 *             # 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 = 205; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L24;
    __pyx_L23_error:;
    if (__pyx_why == 4) {
      Py_XDECREF(__pyx_exc_type);
      Py_XDECREF(__pyx_exc_value);
      Py_XDECREF(__pyx_exc_tb);
    }
    goto __pyx_L1_error;
    __pyx_L24:;
    switch (__pyx_why) {
      case 4: {
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
        __pyx_lineno = __pyx_exc_lineno;
        __pyx_exc_type = 0;
        __pyx_exc_value = 0;
        __pyx_exc_tb = 0;
        goto __pyx_L1_error;
      }
    }
  }

  /* "pandas/src/reduce.pyx":207
 *             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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __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 = 207; __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_11) {

    /* "pandas/src/reduce.pyx":208
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result, counts
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __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 = 208; __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 = 208; __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 = 208; __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_L25;
  }
  __pyx_L25:;

  /* "pandas/src/reduce.pyx":210
 *             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 = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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(__pyx_v_chunk);
  __Pyx_XDECREF((PyObject *)__pyx_v_vslider);
  __Pyx_XDECREF((PyObject *)__pyx_v_islider);
  __Pyx_XDECREF(__pyx_v_gin);
  __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":212
 *         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;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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":213
 * 
 *     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":214
 *     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 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); 
      if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":215
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = PyList_Check(__pyx_v_res); 
      if ((__pyx_t_4 != 0)) {
        __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_6 = __pyx_v_self->dummy;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = (__pyx_t_4 != 0);
      }
      if (unlikely(!((!__pyx_t_9) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":217
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 *             result = np.empty(self.ngroups, dtype='O')             # <<<<<<<<<<<<<<
 *         except Exception:
 *             raise ValueError('function does not reduce')
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __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 = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 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 = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __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_6)); __pyx_t_6 = 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_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "pandas/src/reduce.pyx":218
 * 
 *             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_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/src/reduce.pyx":219
 *             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_30), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __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 = 219; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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":220
 *         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_6);
  __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":120
 * 
 *     cdef public:
 *         object arr, index, dummy, f, bins             # <<<<<<<<<<<<<<
 * 
 *     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_5dummy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5dummy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5dummy___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5dummy___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);
  __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_16SeriesBinGrouper_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_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_16SeriesBinGrouper_5dummy_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_5dummy_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);
  __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_16SeriesBinGrouper_5dummy_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5dummy_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5dummy_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5dummy_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);
  __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_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 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 235; __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 = 235; __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 = 235; __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 = 235; __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 = 235; __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 = 236; __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 = 235; __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":235
 *         object arr, index, dummy, f, labels
 * 
 *     def __init__(self, object series, object f, object labels,             # <<<<<<<<<<<<<<
 *                  Py_ssize_t ngroups, object dummy):
 *         n = len(series)
 */

static int __pyx_pf_6pandas_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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_series);

  /* "pandas/src/reduce.pyx":237
 *     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 = 237; __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 = 237; __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":239
 *         n = len(series)
 * 
 *         self.labels = labels             # <<<<<<<<<<<<<<
 *         self.f = f
 *         if not series.flags.c_contiguous:
 */
  __Pyx_INCREF(__pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_labels;

  /* "pandas/src/reduce.pyx":240
 * 
 *         self.labels = labels
 *         self.f = f             # <<<<<<<<<<<<<<
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "pandas/src/reduce.pyx":241
 *         self.labels = labels
 *         self.f = f
 *         if not series.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             series = series.copy('C')
 *         self.arr = series
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pandas/src/reduce.pyx":242
 *         self.f = f
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = series
 *         self.index = series.index
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_series);
    __pyx_v_series = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":243
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')
 *         self.arr = series             # <<<<<<<<<<<<<<
 *         self.index = series.index
 * 
 */
  __Pyx_INCREF(__pyx_v_series);
  __Pyx_GIVEREF(__pyx_v_series);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_series;

  /* "pandas/src/reduce.pyx":244
 *             series = series.copy('C')
 *         self.arr = series
 *         self.index = series.index             # <<<<<<<<<<<<<<
 * 
 *         self.dummy = self._check_dummy(dummy)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __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":246
 *         self.index = series.index
 * 
 *         self.dummy = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 *         self.passed_dummy = dummy is not None
 *         self.ngroups = ngroups
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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 = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":247
 * 
 *         self.dummy = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None             # <<<<<<<<<<<<<<
 *         self.ngroups = ngroups
 * 
 */
  __pyx_t_5 = (__pyx_v_dummy != Py_None);
  __pyx_v_self->passed_dummy = __pyx_t_5;

  /* "pandas/src/reduce.pyx":248
 *         self.dummy = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None
 *         self.ngroups = ngroups             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
  __pyx_v_self->ngroups = __pyx_v_ngroups;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_series);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":250
 *         self.ngroups = ngroups
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __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 = 250; __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_r = NULL;
  __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;
  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":251
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":252
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_32), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __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_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_dummy);
    __pyx_v_dummy = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/reduce.pyx":254
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/reduce.pyx":255
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __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 = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/reduce.pyx":256
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:             # <<<<<<<<<<<<<<
 *                 dummy = dummy.copy()
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__flags); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = ((!__pyx_t_2) != 0);
    if (__pyx_t_1) {

      /* "pandas/src/reduce.pyx":257
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()             # <<<<<<<<<<<<<<
 * 
 *         return dummy
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_dummy);
      __pyx_v_dummy = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":259
 *                 dummy = dummy.copy()
 * 
 *         return dummy             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dummy);
  __pyx_r = __pyx_v_dummy;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_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":261
 *         return dummy
 * 
 *     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;
  PyObject *__pyx_v_chunk = 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;
  __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":267
 *             Py_ssize_t i, n, group_size, lab
 *             object res, chunk
 *             bint initialized = 0             # <<<<<<<<<<<<<<
 *             Slider vslider, islider
 *             object gin
 */
  __pyx_v_initialized = 0;

  /* "pandas/src/reduce.pyx":271
 *             object gin
 * 
 *         labels = self.labels             # <<<<<<<<<<<<<<
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 *         chunk = self.dummy
 */
  if (!(likely(((__pyx_v_self->labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __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 = 271; __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":272
 * 
 *         labels = self.labels
 *         counts = np.zeros(self.ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         chunk = self.dummy
 *         group_size = 0
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __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 = 272; __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 = 272; __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 = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __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 = 272; __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 = 272; __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 = 272; __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 = 272; __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":273
 *         labels = self.labels
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 *         group_size = 0
 *         n = len(self.arr)
 */
  __pyx_t_10 = __pyx_v_self->dummy;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_v_chunk = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "pandas/src/reduce.pyx":274
 *         counts = np.zeros(self.ngroups, dtype=np.int64)
 *         chunk = self.dummy
 *         group_size = 0             # <<<<<<<<<<<<<<
 *         n = len(self.arr)
 * 
 */
  __pyx_v_group_size = 0;

  /* "pandas/src/reduce.pyx":275
 *         chunk = self.dummy
 *         group_size = 0
 *         n = len(self.arr)             # <<<<<<<<<<<<<<
 * 
 *         vslider = Slider(self.arr, self.dummy)
 */
  __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 = 275; __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":277
 *         n = len(self.arr)
 * 
 *         vslider = Slider(self.arr, self.dummy)             # <<<<<<<<<<<<<<
 *         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 = 277; __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);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_self->dummy);
  __Pyx_GIVEREF(__pyx_v_self->dummy);
  __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 = 277; __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":278
 * 
 *         vslider = Slider(self.arr, self.dummy)
 *         islider = Slider(self.index, self.dummy.index)             # <<<<<<<<<<<<<<
 * 
 *         gin = self.dummy.index._engine
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self->index);
  __Pyx_GIVEREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __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 = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/reduce.pyx":280
 *         islider = Slider(self.index, self.dummy.index)
 * 
 *         gin = self.dummy.index._engine             # <<<<<<<<<<<<<<
 *         try:
 *             for i in range(n):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s___engine); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_gin = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "pandas/src/reduce.pyx":281
 * 
 *         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":282
 *         gin = self.dummy.index._engine
 *         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":283
 *         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":285
 *                 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 = 285; __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":287
 *                 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)) != 0);
          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 = 287; __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))) != 0);
            __pyx_t_17 = __pyx_t_16;
          } else {
            __pyx_t_17 = __pyx_t_14;
          }
          if (__pyx_t_17) {

            /* "pandas/src/reduce.pyx":288
 * 
 *                 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) != 0);
            if (__pyx_t_17) {

              /* "pandas/src/reduce.pyx":289
 *                 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 = 289; __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":290
 *                     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 = 290; __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":291
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)
 *                         group_size = 0             # <<<<<<<<<<<<<<
 *                         continue
 * 
 */
              __pyx_v_group_size = 0;

              /* "pandas/src/reduce.pyx":292
 *                         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":294
 *                         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 = 294; __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":295
 * 
 *                     islider.set_length(group_size)
 *                     vslider.set_length(group_size)             # <<<<<<<<<<<<<<
 * 
 *                     res = self.f(chunk)
 */
            __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 = 295; __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":297
 *                     vslider.set_length(group_size)
 * 
 *                     res = self.f(chunk)             # <<<<<<<<<<<<<<
 * 
 *                     if not initialized:
 */
            __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_INCREF(__pyx_v_chunk);
            PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chunk);
            __Pyx_GIVEREF(__pyx_v_chunk);
            __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 = 297; __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":299
 *                     res = self.f(chunk)
 * 
 *                     if not initialized:             # <<<<<<<<<<<<<<
 *                         result = self._get_result_array(res)
 *                         initialized = 1
 */
            __pyx_t_17 = ((!(__pyx_v_initialized != 0)) != 0);
            if (__pyx_t_17) {

              /* "pandas/src/reduce.pyx":300
 * 
 *                     if not initialized:
 *                         result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                         initialized = 1
 * 
 */
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __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 = 300; __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 = 300; __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 = 300; __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":301
 *                     if not initialized:
 *                         result = self._get_result_array(res)
 *                         initialized = 1             # <<<<<<<<<<<<<<
 * 
 *                     util.assign_value_1d(result, lab, res)
 */
              __pyx_v_initialized = 1;
              goto __pyx_L18;
            }
            __pyx_L18:;

            /* "pandas/src/reduce.pyx":303
 *                         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 = 303; __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 = 303; __pyx_clineno = __LINE__; goto __pyx_L6_error;}

            /* "pandas/src/reduce.pyx":304
 * 
 *                     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 = 304; __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":305
 *                     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 = 305; __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":306
 *                     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 = 306; __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":308
 *                     vslider.advance(group_size)
 * 
 *                     group_size = 0             # <<<<<<<<<<<<<<
 * 
 *                     gin.clear_mapping()
 */
            __pyx_v_group_size = 0;

            /* "pandas/src/reduce.pyx":310
 *                     group_size = 0
 * 
 *                     gin.clear_mapping()             # <<<<<<<<<<<<<<
 * 
 *         except:
 */
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __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 = 310; __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":312
 *                     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 = 312; __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":313
 * 
 *         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 = 313; __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":316
 *         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 = 316; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/src/reduce.pyx":317
 *             # 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 = 317; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L22;
    __pyx_L21_error:;
    if (__pyx_why == 4) {
      Py_XDECREF(__pyx_exc_type);
      Py_XDECREF(__pyx_exc_value);
      Py_XDECREF(__pyx_exc_tb);
    }
    goto __pyx_L1_error;
    __pyx_L22:;
    switch (__pyx_why) {
      case 4: {
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
        __pyx_lineno = __pyx_exc_lineno;
        __pyx_exc_type = 0;
        __pyx_exc_value = 0;
        __pyx_exc_tb = 0;
        goto __pyx_L1_error;
      }
    }
  }

  /* "pandas/src/reduce.pyx":319
 *             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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__object_); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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 = 319; __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_17) {

    /* "pandas/src/reduce.pyx":320
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result, counts
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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 = 320; __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 = 320; __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 = 320; __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_L23;
  }
  __pyx_L23:;

  /* "pandas/src/reduce.pyx":322
 *             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 = 322; __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(__pyx_v_chunk);
  __Pyx_XDECREF((PyObject *)__pyx_v_vslider);
  __Pyx_XDECREF((PyObject *)__pyx_v_islider);
  __Pyx_XDECREF(__pyx_v_gin);
  __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":324
 *         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;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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":325
 * 
 *     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":326
 *     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 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); 
      if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":327
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = PyList_Check(__pyx_v_res); 
      if ((__pyx_t_4 != 0)) {
        __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_6 = __pyx_v_self->dummy;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = (__pyx_t_4 != 0);
      }
      if (unlikely(!((!__pyx_t_9) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "pandas/src/reduce.pyx":329
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 *             result = np.empty(self.ngroups, dtype='O')             # <<<<<<<<<<<<<<
 *         except Exception:
 *             raise ValueError('function does not reduce')
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __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 = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 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 = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __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_6)); __pyx_t_6 = 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_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "pandas/src/reduce.pyx":330
 * 
 *             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_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/src/reduce.pyx":331
 *             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_34), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __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 = 331; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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":332
 *         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_6);
  __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":233
 * 
 *     cdef public:
 *         object arr, index, dummy, f, labels             # <<<<<<<<<<<<<<
 * 
 *     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_5dummy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5dummy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5dummy___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5dummy___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);
  __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_13SeriesGrouper_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_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_13SeriesGrouper_5dummy_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_5dummy_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);
  __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_13SeriesGrouper_5dummy_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5dummy_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5dummy_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5dummy_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);
  __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_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 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 344; __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 = 344; __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 = 344; __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":344
 *         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":345
 * 
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __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 = 345; __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 = 345; __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 = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/src/reduce.pyx":346
 *     def __init__(self, object values, object buf):
 *         assert(values.ndim == 1)
 *         if not values.flags.contiguous:             # <<<<<<<<<<<<<<
 *             values = values.copy()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __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 = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "pandas/src/reduce.pyx":347
 *         assert(values.ndim == 1)
 *         if not values.flags.contiguous:
 *             values = values.copy()             # <<<<<<<<<<<<<<
 * 
 *         assert(values.dtype == buf.dtype)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __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 = 347; __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":349
 *             values = values.copy()
 * 
 *         assert(values.dtype == buf.dtype)             # <<<<<<<<<<<<<<
 *         self.values = values
 *         self.buf = buf
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_buf, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __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 = 349; __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 = 349; __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 = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "pandas/src/reduce.pyx":350
 * 
 *         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 = 350; __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":351
 *         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 = 351; __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":352
 *         self.values = values
 *         self.buf = buf
 *         self.stride = values.strides[0]             # <<<<<<<<<<<<<<
 * 
 *         self.orig_data = self.buf.data
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__strides); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __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, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __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 = 352; __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":354
 *         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":355
 * 
 *         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":356
 *         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":358
 *         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":359
 * 
 *         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":361
 *         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 overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    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 = 361; __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 = 361; __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 = 361; __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":362
 * 
 *     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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 361; __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":361
 *         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 = 361; __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":364
 *         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":368
 *         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":369
 *         '''
 *         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":371
 *         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 overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__set_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __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 = 371; __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 = 371; __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 = 371; __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":372
 * 
 *     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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 371; __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":371
 *         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 = 371; __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":374
 *         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 overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __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 = 374; __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":375
 * 
 *     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":376
 *     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":377
 *         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":374
 *         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 = 374; __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_105apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_105apply_frame_axis0 = {__Pyx_NAMESTR("apply_frame_axis0"), (PyCFunction)__pyx_pw_6pandas_3lib_105apply_frame_axis0, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_105apply_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 383; __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 = 383; __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 = 383; __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 = 383; __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 = 383; __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 = 383; __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 = 384; __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 = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_104apply_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":383
 *     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_104apply_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;
  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;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  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 = 383; __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 = 383; __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":387
 *     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 = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/reduce.pyx":392
 *         dict item_cache
 * 
 *     if frame.index._has_complex_internals:             # <<<<<<<<<<<<<<
 *         raise InvalidApply('Cannot modify frame index internals')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_35); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __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 = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/src/reduce.pyx":393
 * 
 *     if frame.index._has_complex_internals:
 *         raise InvalidApply('Cannot modify frame index internals')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __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 = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":396
 * 
 * 
 *     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 = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_results = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":399
 * 
 *     # 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) != 0);
  if (__pyx_t_4) {

    /* "pandas/src/reduce.pyx":400
 *     # 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 = 400; __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 = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyObject_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)), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __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":401
 *     if n > 0:
 *         chunk = frame[starts[0]:ends[0]]
 *         shape_before = chunk.shape             # <<<<<<<<<<<<<<
 *         try:
 *             result = f(chunk)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __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":402
 *         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":403
 *         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 = 403; __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 = 403; __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":404
 *         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);
        __pyx_t_11 = (__pyx_t_4 != 0);
        if (__pyx_t_11) {

          /* "pandas/src/reduce.pyx":405
 *             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_GetModuleGlobalName(__pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L5_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 = 405; __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 = 405; __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":406
 *             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_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_12);

        /* "pandas/src/reduce.pyx":407
 *                 raise InvalidApply('Function unsafe for fast apply')
 *         except:
 *             raise InvalidApply('Let this error raise above us')             # <<<<<<<<<<<<<<
 * 
 *     slider = BlockSlider(frame)
 */
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_Raise(__pyx_t_14, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __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_12); __pyx_t_12 = 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":409
 *             raise InvalidApply('Let this error raise above us')
 * 
 *     slider = BlockSlider(frame)             # <<<<<<<<<<<<<<
 * 
 *     mutated = False
 */
  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(__pyx_v_frame);
  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_frame);
  __Pyx_GIVEREF(__pyx_v_frame);
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_BlockSlider)), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
  __pyx_v_slider = ((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/src/reduce.pyx":411
 *     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":412
 * 
 *     mutated = False
 *     item_cache = slider.dummy._item_cache             # <<<<<<<<<<<<<<
 *     gin = slider.dummy.index._engine # f7u12
 *     try:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s___item_cache); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_item_cache = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/src/reduce.pyx":413
 *     mutated = False
 *     item_cache = slider.dummy._item_cache
 *     gin = slider.dummy.index._engine # f7u12             # <<<<<<<<<<<<<<
 *     try:
 *         for i in range(n):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s___engine); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_gin = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "pandas/src/reduce.pyx":414
 *     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":415
 *     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_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) {
      __pyx_v_i = __pyx_t_15;

      /* "pandas/src/reduce.pyx":416
 *     try:
 *         for i in range(n):
 *             slider.move(starts[i], ends[i])             # <<<<<<<<<<<<<<
 * 
 *             item_cache.clear() # ugh
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_starts.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_16 >= __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 = 416; __pyx_clineno = __LINE__; goto __pyx_L17;}
      }
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_ends.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_17 >= __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 = 416; __pyx_clineno = __LINE__; goto __pyx_L17;}
      }
      __pyx_t_12 = ((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_16, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_ends.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "pandas/src/reduce.pyx":418
 *             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 = 418; __pyx_clineno = __LINE__; goto __pyx_L17;}
      }
      __pyx_t_18 = __Pyx_PyDict_Clear(__pyx_v_item_cache); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L17;}

      /* "pandas/src/reduce.pyx":419
 * 
 *             item_cache.clear() # ugh
 *             gin.clear_mapping()             # <<<<<<<<<<<<<<
 * 
 *             object.__setattr__(slider.dummy, 'name', names[i])
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pandas/src/reduce.pyx":421
 *             gin.clear_mapping()
 * 
 *             object.__setattr__(slider.dummy, 'name', names[i])             # <<<<<<<<<<<<<<
 *             piece = f(slider.dummy)
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_names, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __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_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "pandas/src/reduce.pyx":422
 * 
 *             object.__setattr__(slider.dummy, 'name', names[i])
 *             piece = f(slider.dummy)             # <<<<<<<<<<<<<<
 * 
 *             # I'm paying the price for index-sharing, ugh
 */
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_v_slider->dummy);
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_slider->dummy);
      __Pyx_GIVEREF(__pyx_v_slider->dummy);
      __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L17;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_v_piece);
      __pyx_v_piece = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/src/reduce.pyx":425
 * 
 *             # I'm paying the price for index-sharing, ugh
 *             try:             # <<<<<<<<<<<<<<
 *                 if piece.index is slider.dummy.index:
 *                     piece.index = piece.index.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":426
 *             # I'm paying the price for index-sharing, ugh
 *             try:
 *                 if piece.index is slider.dummy.index:             # <<<<<<<<<<<<<<
 *                     piece.index = piece.index.copy()
 *                 else:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_piece, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = (__pyx_t_2 == __pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_4 = (__pyx_t_11 != 0);
          if (__pyx_t_4) {

            /* "pandas/src/reduce.pyx":427
 *             try:
 *                 if piece.index is slider.dummy.index:
 *                     piece.index = piece.index.copy()             # <<<<<<<<<<<<<<
 *                 else:
 *                     mutated = True
 */
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_piece, __pyx_n_s__index); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__Pyx_PyObject_SetAttrStr(__pyx_v_piece, __pyx_n_s__index, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            goto __pyx_L29;
          }
          /*else*/ {

            /* "pandas/src/reduce.pyx":429
 *                     piece.index = piece.index.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_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "pandas/src/reduce.pyx":430
 *                 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":432
 *             except AttributeError:
 *                 pass
 *             results.append(piece)             # <<<<<<<<<<<<<<
 *     finally:
 *         slider.reset()
 */
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_results, __pyx_v_piece); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L17;}
    }
  }

  /* "pandas/src/reduce.pyx":434
 *             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_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L18;
    }
    __pyx_L18:;
    __pyx_t_12 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->reset(__pyx_v_slider); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L30_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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":436
 *         slider.reset()
 * 
 *     return results, mutated             # <<<<<<<<<<<<<<
 * 
 * cdef class BlockSlider:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_mutated); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_results));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_results));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_results));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  __pyx_t_12 = 0;
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  { 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 452; __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 = 452; __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":452
 *         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":453
 * 
 *     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":454
 *     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_PyObject_GetSlice(__pyx_v_frame, 0, 0, NULL, NULL, &__pyx_k_slice_42, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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":456
 *         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 = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s___data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__blocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __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_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->blocks);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks));
  __pyx_v_self->blocks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":458
 *         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 = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/reduce.pyx":459
 * 
 *         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 = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    set_array_not_contiguous(((PyArrayObject *)__pyx_v_x));
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/reduce.pyx":461
 *             util.set_array_not_contiguous(x)
 * 
 *         self.nblocks = len(self.blocks)             # <<<<<<<<<<<<<<
 *         self.idx_slider = Slider(self.frame.index, self.dummy.index)
 * 
 */
  __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 = 461; __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 = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->nblocks = __pyx_t_4;

  /* "pandas/src/reduce.pyx":462
 * 
 *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame, __pyx_n_s__index); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s__index); 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(2); 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_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((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_GIVEREF(__pyx_t_2);
  __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_2);
  __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":464
 *         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_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 = 464; __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 = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->base_ptrs = ((char **)malloc(((sizeof(char *)) * __pyx_t_4)));

  /* "pandas/src/reduce.pyx":465
 * 
 *         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_2 = __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_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_block);
    __pyx_v_block = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_i);
    __pyx_v_i = __pyx_t_2;
    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_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_DECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/src/reduce.pyx":466
 *         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 = 466; __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_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.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":468
 *             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":469
 * 
 *     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":471
 *         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 overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__move); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __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 = 471; __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 = 471; __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 = 471; __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 = 471; __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":476
 * 
 *         # 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":477
 *         # 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 = 477; __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, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __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 = 477; __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":480
 * 
 *             # 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":481
 *             # 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":483
 *             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 = 483; __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 471; __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 = 471; __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 = 471; __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 = 471; __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 = 471; __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":471
 *         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 = 471; __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":485
 *         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":490
 * 
 *         # 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":491
 *         # 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 = 491; __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, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __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 = 491; __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":494
 * 
 *             # 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":495
 *             # 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":497
 *             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 = 497; __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":444
 * 
 *     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":445
 *     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 = 445; __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 = 445; __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":446
 *         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 = 446; __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":447
 *         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 = 447; __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_107reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_107reduce = {__Pyx_NAMESTR("reduce"), (PyCFunction)__pyx_pw_6pandas_3lib_107reduce, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_107reduce(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":500
 * 
 * 
 * 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 = 500; __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 = 500; __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 = 500; __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_106reduce(__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_106reduce(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":501
 * 
 * def reduce(arr, f, axis=0, dummy=None, labels=None):
 *     if labels._has_complex_internals:             # <<<<<<<<<<<<<<
 *         raise Exception('Cannot use shortcut')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_35); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __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 = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/reduce.pyx":502
 * 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_44), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __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 = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/reduce.pyx":504
 *         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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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":505
 * 
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels)
 *     return reducer.get_result()             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_reducer), __pyx_n_s__get_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __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 = 505; __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_45;
    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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = 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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s____name__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->name);
    __Pyx_DECREF(__pyx_v_self->name);
    __pyx_v_self->name = __pyx_t_3;
    __pyx_t_3 = 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_3);
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = __Pyx_PyObject_GetAttrStr(__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;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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:
 *             cache = obj._cache = {}
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_obj, ((PyObject *)__pyx_n_s___cache), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cache = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/properties.pyx":24
 * 
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:             # <<<<<<<<<<<<<<
 *             cache = obj._cache = {}
 * 
 */
  __pyx_t_2 = (__pyx_v_cache == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pandas/src/properties.pyx":25
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:
 *             cache = obj._cache = {}             # <<<<<<<<<<<<<<
 * 
 *         if PyDict_Contains(cache, self.name):
 */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_v_cache);
    __pyx_v_cache = ((PyObject *)__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":27
 *             cache = obj._cache = {}
 * 
 *         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_4 = PyDict_Contains(__pyx_v_cache, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "pandas/src/properties.pyx":29
 *         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_5 = PyDict_GetItem(__pyx_v_cache, __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_t_5));
    __pyx_v_val = ((PyObject *)__pyx_t_5);
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/src/properties.pyx":31
 *             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 = 31; __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_6 = PyObject_Call(__pyx_v_self->func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v_val = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/properties.pyx":32
 *         else:
 *             val = self.func(obj)
 *             PyDict_SetItem(cache, self.name, val)             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
    __pyx_t_6 = __pyx_v_self->name;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = PyDict_SetItem(__pyx_v_cache, __pyx_t_6, __pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_L4:;

  /* "pandas/src/properties.pyx":33
 *             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_6);
  __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":35
 *         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;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pandas/src/properties.pyx":37
 *     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 = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/properties.pyx":38
 * 
 *         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_46), __pyx_v_self->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 38; __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 = 38; __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 = 38; __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 = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":41
 * 
 *         # Get the cache or set a default one if needed
 *         cache = getattr(obj, '_cache', None)             # <<<<<<<<<<<<<<
 *         if cache is None:
 *             cache = obj._cache = {}
 */
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, ((PyObject *)__pyx_n_s___cache), Py_None); 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_v_cache = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/properties.pyx":42
 *         # Get the cache or set a default one if needed
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:             # <<<<<<<<<<<<<<
 *             cache = obj._cache = {}
 * 
 */
  __pyx_t_2 = (__pyx_v_cache == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pandas/src/properties.pyx":43
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:
 *             cache = obj._cache = {}             # <<<<<<<<<<<<<<
 * 
 *         PyDict_SetItem(cache, self.name, value)
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_INCREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_cache);
    __pyx_v_cache = ((PyObject *)__pyx_t_3);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/properties.pyx":45
 *             cache = obj._cache = {}
 * 
 *         PyDict_SetItem(cache, self.name, value)             # <<<<<<<<<<<<<<
 * 
 * cdef class AxisProperty(object):
 */
  __pyx_t_3 = __pyx_v_self->name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = PyDict_SetItem(__pyx_v_cache, __pyx_t_3, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 45; __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_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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 51; __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 = 51; __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":51
 *         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":52
 * 
 *     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 = 52; __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":54
 *         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":55
 * 
 *     def __get__(self, obj, type):
 *         cdef list axes = obj._data.axes             # <<<<<<<<<<<<<<
 *         return axes[self.axis]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s___data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__axes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __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 = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_axes = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/properties.pyx":56
 *     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 = 56; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 56; __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":58
 *         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":59
 * 
 *     def __set__(self, obj, value):
 *         obj._set_axis(self.axis, value)             # <<<<<<<<<<<<<<
 * 
 * cdef class SeriesIndex(object):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s___set_axis); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __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 = 59; __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 = 59; __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 = 59; __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 int __pyx_pw_6pandas_3lib_11SeriesIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_3lib_11SeriesIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_6pandas_3lib_11SeriesIndex___init__(((struct __pyx_obj_6pandas_3lib_SeriesIndex *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":65
 *         object _check_type
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         from pandas.core.index import _ensure_index
 *         self._check_type = _ensure_index
 */

static int __pyx_pf_6pandas_3lib_11SeriesIndex___init__(struct __pyx_obj_6pandas_3lib_SeriesIndex *__pyx_v_self) {
  PyObject *__pyx_v__ensure_index = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/src/properties.pyx":66
 * 
 *     def __init__(self):
 *         from pandas.core.index import _ensure_index             # <<<<<<<<<<<<<<
 *         self._check_type = _ensure_index
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s___ensure_index));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s___ensure_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___ensure_index));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_47), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s___ensure_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v__ensure_index = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/properties.pyx":67
 *     def __init__(self):
 *         from pandas.core.index import _ensure_index
 *         self._check_type = _ensure_index             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type):
 */
  __Pyx_INCREF(__pyx_v__ensure_index);
  __Pyx_GIVEREF(__pyx_v__ensure_index);
  __Pyx_GOTREF(__pyx_v_self->_check_type);
  __Pyx_DECREF(__pyx_v_self->_check_type);
  __pyx_v_self->_check_type = __pyx_v__ensure_index;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_11SeriesIndex_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_11SeriesIndex_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_11SeriesIndex_2__get__(((struct __pyx_obj_6pandas_3lib_SeriesIndex *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":69
 *         self._check_type = _ensure_index
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         return obj._index
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_11SeriesIndex_2__get__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/src/properties.pyx":70
 * 
 *     def __get__(self, obj, type):
 *         return obj._index             # <<<<<<<<<<<<<<
 * 
 *     def __set__(self, obj, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s___index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_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.SeriesIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_3lib_11SeriesIndex_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_3lib_11SeriesIndex_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_11SeriesIndex_4__set__(((struct __pyx_obj_6pandas_3lib_SeriesIndex *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":72
 *         return obj._index
 * 
 *     def __set__(self, obj, value):             # <<<<<<<<<<<<<<
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')
 */

static int __pyx_pf_6pandas_3lib_11SeriesIndex_4__set__(struct __pyx_obj_6pandas_3lib_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pandas/src/properties.pyx":73
 * 
 *     def __set__(self, obj, value):
 *         if len(obj) != len(value):             # <<<<<<<<<<<<<<
 *             raise AssertionError('Index length did not match values')
 *         obj._index = val = self._check_type(value)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "pandas/src/properties.pyx":74
 *     def __set__(self, obj, value):
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')             # <<<<<<<<<<<<<<
 *         obj._index = val = self._check_type(value)
 *         if hasattr(val, 'tz'):
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":75
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')
 *         obj._index = val = self._check_type(value)             # <<<<<<<<<<<<<<
 *         if hasattr(val, 'tz'):
 *             # hack for #2139
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_5 = PyObject_Call(__pyx_v_self->_check_type, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s___index, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_t_5);
  __pyx_v_val = __pyx_t_5;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/properties.pyx":76
 *             raise AssertionError('Index length did not match values')
 *         obj._index = val = self._check_type(value)
 *         if hasattr(val, 'tz'):             # <<<<<<<<<<<<<<
 *             # hack for #2139
 *             obj._make_time_series()
 */
  __pyx_t_3 = PyObject_HasAttr(__pyx_v_val, ((PyObject *)__pyx_n_s__tz)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (__pyx_t_6) {

    /* "pandas/src/properties.pyx":78
 *         if hasattr(val, 'tz'):
 *             # hack for #2139
 *             obj._make_time_series()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s___make_time_series); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __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_4); __pyx_t_4 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.lib.SeriesIndex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_14ValuesProperty_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_3lib_14ValuesProperty_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_14ValuesProperty___get__(((struct __pyx_obj_6pandas_3lib_ValuesProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/properties.pyx":83
 * cdef class ValuesProperty(object):
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr = obj
 */

static PyObject *__pyx_pf_6pandas_3lib_14ValuesProperty___get__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib_ValuesProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_base = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/src/properties.pyx":85
 *     def __get__(self, obj, type):
 *         cdef:
 *             ndarray arr = obj             # <<<<<<<<<<<<<<
 *             object base
 * 
 */
  if (!(likely(((__pyx_v_obj) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_obj, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_v_arr = ((PyArrayObject *)__pyx_v_obj);

  /* "pandas/src/properties.pyx":88
 *             object base
 * 
 *         base = np.get_array_base(arr)             # <<<<<<<<<<<<<<
 *         if base is None or not np.PyArray_CheckExact(base):
 *             arr = arr.view(np.ndarray)
 */
  __pyx_t_1 = __pyx_f_5numpy_get_array_base(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/properties.pyx":89
 * 
 *         base = np.get_array_base(arr)
 *         if base is None or not np.PyArray_CheckExact(base):             # <<<<<<<<<<<<<<
 *             arr = arr.view(np.ndarray)
 *         else:
 */
  __pyx_t_2 = (__pyx_v_base == Py_None);
  if (!(__pyx_t_2 != 0)) {
    __pyx_t_3 = ((!(PyArray_CheckExact(__pyx_v_base) != 0)) != 0);
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = (__pyx_t_2 != 0);
  }
  if (__pyx_t_4) {

    /* "pandas/src/properties.pyx":90
 *         base = np.get_array_base(arr)
 *         if base is None or not np.PyArray_CheckExact(base):
 *             arr = arr.view(np.ndarray)             # <<<<<<<<<<<<<<
 *         else:
 *             arr = base
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/properties.pyx":92
 *             arr = arr.view(np.ndarray)
 *         else:
 *             arr = base             # <<<<<<<<<<<<<<
 *         return arr
 */
    if (!(likely(((__pyx_v_base) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_base, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_base);
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "pandas/src/properties.pyx":93
 *         else:
 *             arr = base
 *         return arr             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
  __pyx_r = ((PyObject *)__pyx_v_arr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.ValuesProperty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_109infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_109infer_dtype = {__Pyx_NAMESTR("infer_dtype"), (PyCFunction)__pyx_pw_6pandas_3lib_109infer_dtype, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_109infer_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_108infer_dtype(__pyx_self, ((PyObject *)__pyx_v__values));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":31
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_3lib_108infer_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
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_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":37
 *         ndarray values
 * 
 *     if isinstance(_values, np.ndarray):             # <<<<<<<<<<<<<<
 *         values = _values
 *     else:
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v__values, ((PyObject*)__pyx_ptype_5numpy_ndarray)); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":38
 * 
 *     if isinstance(_values, np.ndarray):
 *         values = _values             # <<<<<<<<<<<<<<
 *     else:
 *         if not isinstance(_values, list):
 */
    if (!(likely(((__pyx_v__values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v__values);
    __pyx_v_values = ((PyArrayObject *)__pyx_v__values);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":40
 *         values = _values
 *     else:
 *         if not isinstance(_values, list):             # <<<<<<<<<<<<<<
 *             _values = list(_values)
 *         values = list_to_object_array(_values)
 */
    __pyx_t_2 = PyList_Check(__pyx_v__values); 
    __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
    if (__pyx_t_1) {

      /* "pandas/src/inference.pyx":41
 *     else:
 *         if not isinstance(_values, list):
 *             _values = list(_values)             # <<<<<<<<<<<<<<
 *         values = list_to_object_array(_values)
 * 
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __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_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v__values);
      __pyx_v__values = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/src/inference.pyx":42
 *         if not isinstance(_values, list):
 *             _values = list(_values)
 *         values = list_to_object_array(_values)             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_50); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __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 = 42; __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_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __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_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[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_values = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":44
 *         values = list_to_object_array(_values)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return 'empty'
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_6;

  /* "pandas/src/inference.pyx":45
 * 
 *     n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return 'empty'
 * 
 */
  __pyx_t_1 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_1) {

    /* "pandas/src/inference.pyx":46
 *     n = len(values)
 *     if n == 0:
 *         return 'empty'             # <<<<<<<<<<<<<<
 * 
 *     val_kind = values.dtype.type
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__empty));
    __pyx_r = ((PyObject *)__pyx_n_s__empty);
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/src/inference.pyx":48
 *         return 'empty'
 * 
 *     val_kind = values.dtype.type             # <<<<<<<<<<<<<<
 *     if val_kind in _TYPE_MAP:
 *         return _TYPE_MAP[val_kind]
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((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_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_val_kind = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":49
 * 
 *     val_kind = values.dtype.type
 *     if val_kind in _TYPE_MAP:             # <<<<<<<<<<<<<<
 *         return _TYPE_MAP[val_kind]
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_val_kind, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __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_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/src/inference.pyx":52
 *         return _TYPE_MAP[val_kind]
 * 
 *     if values.dtype != np.object_:             # <<<<<<<<<<<<<<
 *         values = values.astype('O')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __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_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":53
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     val = util.get_value_1d(values, 0)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_51), 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_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[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_L7;
  }
  __pyx_L7:;

  /* "pandas/src/inference.pyx":55
 *         values = values.astype('O')
 * 
 *     val = util.get_value_1d(values, 0)             # <<<<<<<<<<<<<<
 * 
 *     if util.is_datetime64_object(val):
 */
  __pyx_t_4 = get_value_1d(__pyx_v_values, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_val = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/src/inference.pyx":57
 *     val = util.get_value_1d(values, 0)
 * 
 *     if util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *         if is_datetime64_array(values):
 *             return 'datetime64'
 */
  __pyx_t_2 = (is_datetime64_object(__pyx_v_val) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":58
 * 
 *     if util.is_datetime64_object(val):
 *         if is_datetime64_array(values):             # <<<<<<<<<<<<<<
 *             return 'datetime64'
 *     elif util.is_integer_object(val):
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_datetime64_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __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 = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __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_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":59
 *     if util.is_datetime64_object(val):
 *         if is_datetime64_array(values):
 *             return 'datetime64'             # <<<<<<<<<<<<<<
 *     elif util.is_integer_object(val):
 *         if is_integer_array(values):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime64));
      __pyx_r = ((PyObject *)__pyx_n_s__datetime64);
      goto __pyx_L0;
      goto __pyx_L9;
    }
    __pyx_L9:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":60
 *         if is_datetime64_array(values):
 *             return 'datetime64'
 *     elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *         if is_integer_array(values):
 *             return 'integer'
 */
  __pyx_t_2 = (is_integer_object(__pyx_v_val) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":61
 *             return 'datetime64'
 *     elif util.is_integer_object(val):
 *         if is_integer_array(values):             # <<<<<<<<<<<<<<
 *             return 'integer'
 *         elif is_integer_float_array(values):
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_integer_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":62
 *     elif util.is_integer_object(val):
 *         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_L10;
    }

    /* "pandas/src/inference.pyx":63
 *         if is_integer_array(values):
 *             return 'integer'
 *         elif is_integer_float_array(values):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer-float'
 *         return 'mixed-integer'
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_52); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __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 = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __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_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":64
 *             return 'integer'
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'             # <<<<<<<<<<<<<<
 *         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_L10;
    }
    __pyx_L10:;

    /* "pandas/src/inference.pyx":65
 *         elif is_integer_float_array(values):
 *             return 'mixed-integer-float'
 *         return 'mixed-integer'             # <<<<<<<<<<<<<<
 *     elif is_datetime(val):
 *         if is_datetime_array(values):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_54));
    __pyx_r = ((PyObject *)__pyx_kp_s_54);
    goto __pyx_L0;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":66
 *             return 'mixed-integer-float'
 *         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) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":67
 *         return 'mixed-integer'
 *     elif is_datetime(val):
 *         if is_datetime_array(values):             # <<<<<<<<<<<<<<
 *             return 'datetime'
 * 
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_datetime_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":68
 *     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_L11;
    }
    __pyx_L11:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":70
 *             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) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":71
 * 
 *     elif is_date(val):
 *         if is_date_array(values):             # <<<<<<<<<<<<<<
 *             return 'date'
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_date_array); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); 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_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":72
 *     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_L12;
    }
    __pyx_L12:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":74
 *             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) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":75
 * 
 *     elif is_time(val):
 *         if is_time_array(values):             # <<<<<<<<<<<<<<
 *             return 'time'
 * 
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_time_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":76
 *     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_L13;
    }
    __pyx_L13:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":78
 *             return 'time'
 * 
 *     elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *         if is_float_array(values):
 *             return 'floating'
 */
  __pyx_t_2 = (is_float_object(__pyx_v_val) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":79
 * 
 *     elif util.is_float_object(val):
 *         if is_float_array(values):             # <<<<<<<<<<<<<<
 *             return 'floating'
 *         elif is_integer_float_array(values):
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_float_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __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 = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __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_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":80
 *     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_L14;
    }

    /* "pandas/src/inference.pyx":81
 *         if is_float_array(values):
 *             return 'floating'
 *         elif is_integer_float_array(values):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer-float'
 * 
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_52); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":82
 *             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_53));
      __pyx_r = ((PyObject *)__pyx_kp_s_53);
      goto __pyx_L0;
      goto __pyx_L14;
    }
    __pyx_L14:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":84
 *             return 'mixed-integer-float'
 * 
 *     elif util.is_bool_object(val):             # <<<<<<<<<<<<<<
 *         if is_bool_array(values):
 *             return 'boolean'
 */
  __pyx_t_2 = (is_bool_object(__pyx_v_val) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":85
 * 
 *     elif util.is_bool_object(val):
 *         if is_bool_array(values):             # <<<<<<<<<<<<<<
 *             return 'boolean'
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_bool_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __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 = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __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_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":86
 *     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_L15;
    }
    __pyx_L15:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":88
 *             return 'boolean'
 * 
 *     elif PyString_Check(val):             # <<<<<<<<<<<<<<
 *         if is_string_array(values):
 *             return 'string'
 */
  __pyx_t_2 = (PyString_Check(__pyx_v_val) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":89
 * 
 *     elif PyString_Check(val):
 *         if is_string_array(values):             # <<<<<<<<<<<<<<
 *             return 'string'
 * 
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_string_array); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__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 = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":90
 *     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_L16;
    }
    __pyx_L16:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":92
 *             return 'string'
 * 
 *     elif PyUnicode_Check(val):             # <<<<<<<<<<<<<<
 *         if is_unicode_array(values):
 *             return 'unicode'
 */
  __pyx_t_2 = (PyUnicode_Check(__pyx_v_val) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":93
 * 
 *     elif PyUnicode_Check(val):
 *         if is_unicode_array(values):             # <<<<<<<<<<<<<<
 *             return 'unicode'
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_unicode_array); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); 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_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":94
 *     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_L17;
    }
    __pyx_L17:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":96
 *             return 'unicode'
 * 
 *     elif is_timedelta(val):             # <<<<<<<<<<<<<<
 *         if is_timedelta_or_timedelta64_array(values):
 *             return 'timedelta'
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_timedelta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":97
 * 
 *     elif is_timedelta(val):
 *         if is_timedelta_or_timedelta64_array(values):             # <<<<<<<<<<<<<<
 *             return 'timedelta'
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_55); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), 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_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 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_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_L18;
    }
    __pyx_L18:;
    goto __pyx_L8;
  }

  /* "pandas/src/inference.pyx":100
 *             return 'timedelta'
 * 
 *     elif is_period(val):             # <<<<<<<<<<<<<<
 *         if is_period_array(values):
 *             return 'period'
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_period); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":101
 * 
 *     elif is_period(val):
 *         if is_period_array(values):             # <<<<<<<<<<<<<<
 *             return 'period'
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_period_array); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); 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_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":102
 *     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_L19;
    }
    __pyx_L19:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "pandas/src/inference.pyx":104
 *             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":105
 * 
 *     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 = 105; __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":106
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)
 *         if util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer'
 * 
 */
    __pyx_t_2 = (is_integer_object(__pyx_v_val) != 0);
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":107
 *         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_54));
      __pyx_r = ((PyObject *)__pyx_kp_s_54);
      goto __pyx_L0;
      goto __pyx_L22;
    }
    __pyx_L22:;
  }

  /* "pandas/src/inference.pyx":109
 *             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_3);
  __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_111infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_111infer_dtype_list = {__Pyx_NAMESTR("infer_dtype_list"), (PyCFunction)__pyx_pw_6pandas_3lib_111infer_dtype_list, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_111infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_110infer_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":111
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_110infer_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":113
 * 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 = 113; __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 = 113; __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":117
 * 
 * 
 * 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":118
 * 
 * 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":120
 *     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":121
 * 
 * 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":123
 *     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":124
 * 
 * cdef inline bint is_time(object o):
 *     return PyTime_Check(o)             # <<<<<<<<<<<<<<
 * 
 * def is_bool_array(ndarray values):
 */
  __pyx_r = PyTime_Check(__pyx_v_o);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_113is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_113is_bool_array = {__Pyx_NAMESTR("is_bool_array"), (PyCFunction)__pyx_pw_6pandas_3lib_113is_bool_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_113is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_112is_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":126
 *     return PyTime_Check(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_112is_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;
  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_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":128
 * 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 = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":132
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.bool_):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __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 = 132; __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;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":133
 * 
 *     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 = 133; __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":134
 *     if issubclass(values.dtype.type, np.bool_):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __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 = 134; __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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":135
 *         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 = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":137
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = ((__pyx_v_n == 0) != 0);
    if (__pyx_t_6) {

      /* "pandas/src/inference.pyx":138
 * 
 *         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 = 138; __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":140
 *             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_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "pandas/src/inference.pyx":141
 * 
 *         for i in range(n):
 *             if not util.is_bool_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = ((!(is_bool_object(__pyx_t_3) != 0)) != 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":142
 *         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 = 142; __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":143
 *             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 = 143; __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":145
 *         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 = 145; __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_115is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_115is_integer = {__Pyx_NAMESTR("is_integer"), (PyCFunction)__pyx_pw_6pandas_3lib_115is_integer, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_115is_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_114is_integer(__pyx_self, ((PyObject *)__pyx_v_o));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":147
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_114is_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":148
 * 
 * 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 = 148; __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_117is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_117is_integer_array = {__Pyx_NAMESTR("is_integer_array"), (PyCFunction)__pyx_pw_6pandas_3lib_117is_integer_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_117is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_116is_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":150
 *     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_116is_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;
  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_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":152
 * 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 = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":156
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.integer):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __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 = 156; __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;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":157
 * 
 *     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 = 157; __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":158
 *     if issubclass(values.dtype.type, np.integer):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __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 = 158; __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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":159
 *         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 = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":161
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = ((__pyx_v_n == 0) != 0);
    if (__pyx_t_6) {

      /* "pandas/src/inference.pyx":162
 * 
 *         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 = 162; __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":164
 *             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_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "pandas/src/inference.pyx":165
 * 
 *         for i in range(n):
 *             if not util.is_integer_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = ((!(is_integer_object(__pyx_t_3) != 0)) != 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":166
 *         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 = 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_L7;
      }
      __pyx_L7:;
    }

    /* "pandas/src/inference.pyx":167
 *             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 = 167; __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":169
 *         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 = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __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_119is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_119is_integer_float_array = {__Pyx_NAMESTR("is_integer_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_119is_integer_float_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_119is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_118is_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":171
 *         return False
 * 
 * def is_integer_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_118is_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;
  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;
  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":173
 * 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 = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":177
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.integer):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __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 = 177; __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;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":178
 * 
 *     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 = 178; __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":179
 *     if issubclass(values.dtype.type, np.integer):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __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 = 179; __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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":180
 *         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 = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":182
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = ((__pyx_v_n == 0) != 0);
    if (__pyx_t_6) {

      /* "pandas/src/inference.pyx":183
 * 
 *         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 = 183; __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":185
 *             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_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "pandas/src/inference.pyx":186
 * 
 *         for i in range(n):
 *             if not (util.is_integer_object(objbuf[i]) or             # <<<<<<<<<<<<<<
 *                     util.is_float_object(objbuf[i])):
 * 
 */
      __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 = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = (is_integer_object(__pyx_t_3) != 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_6) {

        /* "pandas/src/inference.pyx":187
 *         for i in range(n):
 *             if not (util.is_integer_object(objbuf[i]) or
 *                     util.is_float_object(objbuf[i])):             # <<<<<<<<<<<<<<
 * 
 *                 return False
 */
        __pyx_t_13 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_13 < 0) {
          __pyx_t_13 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_13 >= __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 = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_objbuf.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_3);
        __pyx_t_5 = (is_float_object(__pyx_t_3) != 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_14 = __pyx_t_5;
      } else {
        __pyx_t_14 = __pyx_t_6;
      }
      __pyx_t_6 = ((!__pyx_t_14) != 0);
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":189
 *                     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 = 189; __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":190
 * 
 *                 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 = 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_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":192
 *         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 = 192; __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_121is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_121is_float_array = {__Pyx_NAMESTR("is_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_121is_float_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_121is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_120is_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":194
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_120is_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;
  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_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":196
 * 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 = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":200
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.floating):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__floating); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 200; __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;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":201
 * 
 *     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 = 201; __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":202
 *     if issubclass(values.dtype.type, np.floating):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __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 = 202; __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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":203
 *         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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":205
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = ((__pyx_v_n == 0) != 0);
    if (__pyx_t_6) {

      /* "pandas/src/inference.pyx":206
 * 
 *         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 = 206; __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":208
 *             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_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "pandas/src/inference.pyx":209
 * 
 *         for i in range(n):
 *             if not util.is_float_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = ((!(is_float_object(__pyx_t_3) != 0)) != 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":210
 *         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 = 210; __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":211
 *             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 = 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_L3;
  }
  /*else*/ {

    /* "pandas/src/inference.pyx":213
 *         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 = 213; __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_123is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_123is_string_array = {__Pyx_NAMESTR("is_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_123is_string_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_123is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_122is_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":215
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_122is_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;
  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("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":217
 * 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 = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":221
 *         object obj
 * 
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__string_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __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 = 221; __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 = 221; __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;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pandas/src/inference.pyx":222
 * 
 *     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 = 222; __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":223
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __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 = 223; __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_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "pandas/src/inference.pyx":224
 *         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_8 = __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_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        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_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_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_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":226
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_7 = ((__pyx_v_n == 0) != 0);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":227
 * 
 *         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 = 227; __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":229
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not PyString_Check(objbuf[i]):
 *                 return False
 */
    __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":230
 * 
 *         for i in range(n):
 *             if not PyString_Check(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_objbuf.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 = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_7 = ((!(PyString_Check(__pyx_t_3) != 0)) != 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {

        /* "pandas/src/inference.pyx":231
 *         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 = 231; __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":232
 *             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 = 232; __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":234
 *         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 = 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;
  }
  __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_125is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_125is_unicode_array = {__Pyx_NAMESTR("is_unicode_array"), (PyCFunction)__pyx_pw_6pandas_3lib_125is_unicode_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_125is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_124is_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":236
 *         return False
 * 
 * def is_unicode_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_124is_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;
  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_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":238
 * 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 = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":242
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.unicode_):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __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 = 242; __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;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":243
 * 
 *     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 = 243; __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":244
 *     if issubclass(values.dtype.type, np.unicode_):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __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 = 244; __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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":245
 *         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 = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "pandas/src/inference.pyx":247
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = ((__pyx_v_n == 0) != 0);
    if (__pyx_t_6) {

      /* "pandas/src/inference.pyx":248
 * 
 *         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 = 248; __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":250
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not PyUnicode_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":251
 * 
 *         for i in range(n):
 *             if not PyUnicode_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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (PyObject *) *__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 = ((!(PyUnicode_Check(__pyx_t_3) != 0)) != 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":252
 *         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 = 252; __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":253
 *             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 = 253; __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":255
 *         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 = 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;
  }
  __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_127is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_127is_datetime_array = {__Pyx_NAMESTR("is_datetime_array"), (PyCFunction)__pyx_pw_6pandas_3lib_127is_datetime_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_127is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_126is_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":258
 * 
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_3lib_126is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_datetime_array", 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 = 258; __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":259
 * 
 * def is_datetime_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":260
 * def is_datetime_array(ndarray[object] values):
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":261
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not is_datetime(values[i]):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __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":262
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not is_datetime(values[i]):
 *             return False
 */
  __pyx_t_4 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pandas/src/inference.pyx":263
 *         return False
 *     for i in range(n):
 *         if not is_datetime(values[i]):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = (PyObject *) *__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_datetime(__pyx_t_3) != 0)) != 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":264
 *     for i in range(n):
 *         if not is_datetime(values[i]):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __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":265
 *         if not is_datetime(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 265; __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_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_129is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_129is_datetime64_array = {__Pyx_NAMESTR("is_datetime64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_129is_datetime64_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_129is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_128is_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":268
 * 
 * 
 * def is_datetime64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_3lib_128is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_datetime64_array", 0);

  /* "pandas/src/inference.pyx":269
 * 
 * def is_datetime64_array(ndarray 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 = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":270
 * def is_datetime64_array(ndarray values):
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":271
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not util.is_datetime64_object(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 = 271; __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":272
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not util.is_datetime64_object(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":273
 *         return False
 *     for i in range(n):
 *         if not util.is_datetime64_object(values[i]):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = ((!(is_datetime64_object(__pyx_t_3) != 0)) != 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":274
 *     for i in range(n):
 *         if not util.is_datetime64_object(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 = 274; __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":275
 *         if not util.is_datetime64_object(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta(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 = 275; __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_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_131is_timedelta = {__Pyx_NAMESTR("is_timedelta"), (PyCFunction)__pyx_pw_6pandas_3lib_131is_timedelta, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_3lib_130is_timedelta(__pyx_self, ((PyObject *)__pyx_v_o));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":277
 *     return True
 * 
 * def is_timedelta(object o):             # <<<<<<<<<<<<<<
 *     import datetime
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 */

static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timedelta", 0);

  /* "pandas/src/inference.pyx":278
 * 
 * def is_timedelta(object o):
 *     import datetime             # <<<<<<<<<<<<<<
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 * 
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":279
 * def is_timedelta(object o):
 *     import datetime
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_o, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = PyObject_IsInstance(__pyx_v_o, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __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);
  __Pyx_AddTraceback("pandas.lib.is_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_133is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_133is_timedelta_array = {__Pyx_NAMESTR("is_timedelta_array"), (PyCFunction)__pyx_pw_6pandas_3lib_133is_timedelta_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_133is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_132is_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":281
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 * 
 * def is_timedelta_array(ndarray values):             # <<<<<<<<<<<<<<
 *     import datetime
 *     cdef int i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_132is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  PyObject *__pyx_v_datetime = NULL;
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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":282
 * 
 * def is_timedelta_array(ndarray values):
 *     import datetime             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":283
 * def is_timedelta_array(ndarray values):
 *     import datetime
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/inference.pyx":284
 *     import datetime
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_3 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_3) {

    /* "pandas/src/inference.pyx":285
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not isinstance(values[i],datetime.timedelta):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":286
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not isinstance(values[i],datetime.timedelta):
 *             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":287
 *         return False
 *     for i in range(n):
 *         if not isinstance(values[i],datetime.timedelta):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = ((!(__pyx_t_3 != 0)) != 0);
    if (__pyx_t_7) {

      /* "pandas/src/inference.pyx":288
 *     for i in range(n):
 *         if not isinstance(values[i],datetime.timedelta):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __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_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/src/inference.pyx":289
 *         if not isinstance(values[i],datetime.timedelta):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta64_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __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_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.lib.is_timedelta_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_135is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_135is_timedelta64_array = {__Pyx_NAMESTR("is_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_135is_timedelta64_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_135is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_134is_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":291
 *     return True
 * 
 * def is_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_3lib_134is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timedelta64_array", 0);

  /* "pandas/src/inference.pyx":292
 * 
 * def is_timedelta64_array(ndarray 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 = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":293
 * def is_timedelta64_array(ndarray values):
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":294
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not isinstance(values[i],np.timedelta64):
 */
    __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_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":295
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not isinstance(values[i],np.timedelta64):
 *             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":296
 *         return False
 *     for i in range(n):
 *         if not isinstance(values[i],np.timedelta64):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_2 = PyObject_IsInstance(__pyx_t_3, __pyx_t_7); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = ((!(__pyx_t_2 != 0)) != 0);
    if (__pyx_t_8) {

      /* "pandas/src/inference.pyx":297
 *     for i in range(n):
 *         if not isinstance(values[i],np.timedelta64):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/src/inference.pyx":298
 *         if not isinstance(values[i],np.timedelta64):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.lib.is_timedelta64_array", __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_137is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_137is_timedelta_or_timedelta64_array = {__Pyx_NAMESTR("is_timedelta_or_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_137is_timedelta_or_timedelta64_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_137is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_136is_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":300
 *     return True
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     import datetime
 *     cdef int i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_3lib_136is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  PyObject *__pyx_v_datetime = NULL;
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  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":301
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):
 *     import datetime             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":302
 * def is_timedelta_or_timedelta64_array(ndarray values):
 *     import datetime
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/inference.pyx":303
 *     import datetime
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_3 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_3) {

    /* "pandas/src/inference.pyx":304
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not (isinstance(values[i],datetime.timedelta) or isinstance(values[i],np.timedelta64)):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":305
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not (isinstance(values[i],datetime.timedelta) or isinstance(values[i],np.timedelta64)):
 *             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":306
 *         return False
 *     for i in range(n):
 *         if not (isinstance(values[i],datetime.timedelta) or isinstance(values[i],np.timedelta64)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(__pyx_t_3 != 0)) {
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = PyObject_IsInstance(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = (__pyx_t_8 != 0);
    } else {
      __pyx_t_9 = (__pyx_t_3 != 0);
    }
    __pyx_t_3 = ((!__pyx_t_9) != 0);
    if (__pyx_t_3) {

      /* "pandas/src/inference.pyx":307
 *     for i in range(n):
 *         if not (isinstance(values[i],datetime.timedelta) or isinstance(values[i],np.timedelta64)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/src/inference.pyx":308
 *         if not (isinstance(values[i],datetime.timedelta) or isinstance(values[i],np.timedelta64)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def is_date_array(ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_139is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_139is_date_array = {__Pyx_NAMESTR("is_date_array"), (PyCFunction)__pyx_pw_6pandas_3lib_139is_date_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_139is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_138is_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":310
 *     return True
 * 
 * def is_date_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_3lib_138is_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 = 310; __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":311
 * 
 * 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 = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":312
 * 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) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":313
 *     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 = 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):             # <<<<<<<<<<<<<<
 *         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":315
 *         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 = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = (PyObject *) *__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) != 0)) != 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":316
 *     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 = 316; __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":317
 *         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 = 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;

  __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_141is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_141is_time_array = {__Pyx_NAMESTR("is_time_array"), (PyCFunction)__pyx_pw_6pandas_3lib_141is_time_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_141is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_140is_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":319
 *     return True
 * 
 * def is_time_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_3lib_140is_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 = 319; __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":320
 * 
 * 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 = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":321
 * 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) != 0);
  if (__pyx_t_2) {

    /* "pandas/src/inference.pyx":322
 *     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 = 322; __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":323
 *     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":324
 *         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 = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = (PyObject *) *__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) != 0)) != 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/src/inference.pyx":325
 *     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 = 325; __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":326
 *         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 = 326; __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_143is_period(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_143is_period = {__Pyx_NAMESTR("is_period"), (PyCFunction)__pyx_pw_6pandas_3lib_143is_period, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_143is_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_142is_period(__pyx_self, ((PyObject *)__pyx_v_o));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":328
 *     return True
 * 
 * def is_period(object o):             # <<<<<<<<<<<<<<
 *     from pandas import Period
 *     return isinstance(o,Period)
 */

static PyObject *__pyx_pf_6pandas_3lib_142is_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":329
 * 
 * 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 = 329; __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 = 329; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__Period); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __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":330
 * 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 = 330; __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 = 330; __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_145is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_145is_period_array = {__Pyx_NAMESTR("is_period_array"), (PyCFunction)__pyx_pw_6pandas_3lib_145is_period_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_145is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_144is_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":332
 *     return isinstance(o,Period)
 * 
 * def is_period_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     from pandas import Period
 */

static PyObject *__pyx_pf_6pandas_3lib_144is_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 = 332; __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":333
 * 
 * def is_period_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     from pandas import Period
 * 
 */
  __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":334
 * def is_period_array(ndarray[object] values):
 *     cdef int i, n = len(values)
 *     from pandas import Period             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __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__pandas), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __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 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__Period); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __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":336
 *     from pandas import Period
 * 
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_4 = ((__pyx_v_n == 0) != 0);
  if (__pyx_t_4) {

    /* "pandas/src/inference.pyx":337
 * 
 *     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 = 337; __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":338
 *     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":339
 *         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 = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = (PyObject *) *__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 = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_9) {

      /* "pandas/src/inference.pyx":340
 *     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 = 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 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 = 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_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_147maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_146maybe_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_147maybe_convert_numeric = {__Pyx_NAMESTR("maybe_convert_numeric"), (PyCFunction)__pyx_pw_6pandas_3lib_147maybe_convert_numeric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_146maybe_convert_numeric)};
static PyObject *__pyx_pw_6pandas_3lib_147maybe_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_56;
    values[3] = __pyx_k_57;
    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 = 350; __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 = 350; __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 = 350; __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 = 350; __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 = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_146maybe_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":350
 * 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_146maybe_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;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  __pyx_t_5numpy_float64_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_double_complex __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  __pyx_t_5numpy_int64_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_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 = 350; __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":362
 *         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":363
 *         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":367
 *         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 = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":369
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 369; __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 = 369; __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 = 369; __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 = 369; __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 = 369; __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 = 369; __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 = 369; __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 = 369; __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":370
 * 
 *     floats = np.empty(n, dtype='f8')
 *     complexes = np.empty(n, dtype='c16')             # <<<<<<<<<<<<<<
 *     ints = np.empty(n, dtype='i8')
 * 
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 370; __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 = 370; __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 = 370; __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 = 370; __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 = 370; __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 = 370; __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 = 370; __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 = 370; __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":371
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 371; __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 = 371; __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 = 371; __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 = 371; __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 = 371; __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 = 371; __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 = 371; __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 = 371; __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":373
 *     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":374
 * 
 *     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 = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = (PyObject *) *__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":376
 *         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 = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_15 = (__pyx_t_14 != 0);
    if (__pyx_t_15) {

      /* "pandas/src/inference.pyx":377
 * 
 *         if val in na_values:
 *             floats[i] = complexes[i] = nan             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif util.is_float_object(val):
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan;
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __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 = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0);

      /* "pandas/src/inference.pyx":378
 *         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":379
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1
 *         elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 */
    __pyx_t_15 = (is_float_object(__pyx_v_val) != 0);
    if (__pyx_t_15) {

      /* "pandas/src/inference.pyx":380
 *             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_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18;
      __pyx_t_20 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 380; __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_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 = 380; __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_20;

      /* "pandas/src/inference.pyx":381
 *         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":382
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 *         elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = ints[i] = val
 *             seen_int = 1
 */
    __pyx_t_15 = (is_integer_object(__pyx_v_val) != 0);
    if (__pyx_t_15) {

      /* "pandas/src/inference.pyx":383
 *             seen_float = 1
 *         elif util.is_integer_object(val):
 *             floats[i] = ints[i] = val             # <<<<<<<<<<<<<<
 *             seen_int = 1
 *         elif val is None:
 */
      __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_22 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_22 < 0) {
        __pyx_t_22 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_22 >= __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 = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18;
      __pyx_t_23 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_23 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __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_ints.diminfo[0].shape;
        if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_24 >= __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 = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_23;

      /* "pandas/src/inference.pyx":384
 *         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":385
 *             floats[i] = ints[i] = val
 *             seen_int = 1
 *         elif val is None:             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = nan
 *             seen_float = 1
 */
    __pyx_t_15 = (__pyx_v_val == Py_None);
    __pyx_t_14 = (__pyx_t_15 != 0);
    if (__pyx_t_14) {

      /* "pandas/src/inference.pyx":386
 *             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_25 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_25 < 0) {
        __pyx_t_25 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_25 >= __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 = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan;
      __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 = 386; __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_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0);

      /* "pandas/src/inference.pyx":387
 *         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":388
 *             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_14 = PyObject_HasAttr(__pyx_v_val, ((PyObject *)__pyx_n_s____len__)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_14 != 0)) {
      __pyx_t_27 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_27 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_15 = ((__pyx_t_27 == 0) != 0);
      __pyx_t_28 = __pyx_t_15;
    } else {
      __pyx_t_28 = (__pyx_t_14 != 0);
    }
    if (__pyx_t_28) {

      /* "pandas/src/inference.pyx":389
 *             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 = 389; __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_15 = __pyx_t_14;
      } else {
        __pyx_t_15 = __pyx_t_28;
      }
      if (__pyx_t_15) {

        /* "pandas/src/inference.pyx":390
 *         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_27 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_27 < 0) {
          __pyx_t_27 += __pyx_pybuffernd_floats.diminfo[0].shape;
          if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_27 >= __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 = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_27, __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 = 390; __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":391
 *             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":393
 *                 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_59), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 393; __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 = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":394
 *             else:
 *                 raise ValueError('Empty string encountered')
 *         elif util.is_complex_object(val):             # <<<<<<<<<<<<<<
 *             complexes[i] = val
 *             seen_complex = 1
 */
    __pyx_t_15 = (is_complex_object(__pyx_v_val) != 0);
    if (__pyx_t_15) {

      /* "pandas/src/inference.pyx":395
 *                 raise ValueError('Empty string encountered')
 *         elif util.is_complex_object(val):
 *             complexes[i] = val             # <<<<<<<<<<<<<<
 *             seen_complex = 1
 *         else:
 */
      __pyx_t_20 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 395; __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 = 395; __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_20;

      /* "pandas/src/inference.pyx":396
 *         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":398
 *             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":399
 *         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 = 399; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __pyx_v_status = __pyx_t_7;

          /* "pandas/src/inference.pyx":400
 *             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 = 400; __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":401
 *                 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_15 = ((!(__pyx_v_seen_float != 0)) != 0);
          if (__pyx_t_15) {

            /* "pandas/src/inference.pyx":402
 *                 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_15 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_60), __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            if (!(__pyx_t_15 != 0)) {
              __pyx_t_28 = ((__pyx_v_fval == __pyx_v_6pandas_3lib_INF) != 0);
              if (!__pyx_t_28) {
                __pyx_t_14 = ((__pyx_v_fval == __pyx_v_6pandas_3lib_NEGINF) != 0);
                __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_15 != 0);
            }
            if (__pyx_t_28) {

              /* "pandas/src/inference.pyx":403
 *                 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":404
 *                     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 = 404; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __pyx_t_15 = (__pyx_t_28 != 0);
            if (__pyx_t_15) {

              /* "pandas/src/inference.pyx":405
 *                         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":406
 *                     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_15 = ((__pyx_v_fval < __pyx_v_6pandas_3lib_fINT64_MAX) != 0);
            if (__pyx_t_15) {
              __pyx_t_28 = ((__pyx_v_fval > __pyx_v_6pandas_3lib_fINT64_MIN) != 0);
              __pyx_t_32 = __pyx_t_28;
            } else {
              __pyx_t_32 = __pyx_t_15;
            }
            if (__pyx_t_32) {

              /* "pandas/src/inference.pyx":407
 *                         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":408
 *                     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 = 408; __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 = 408; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
                  __pyx_t_23 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_23 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 408; __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 = 408; __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_23;
                }
                __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":409
 *                         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 = 409; __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":410
 *                             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 = 410; __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":412
 *                             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":413
 *                     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 = 413; __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":414
 *                         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 = 414; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __pyx_t_15 = ((!__pyx_t_32) != 0);
          if (__pyx_t_15) {

            /* "pandas/src/inference.pyx":415
 *             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 = 415; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
            goto __pyx_L29;
          }
          __pyx_L29:;

          /* "pandas/src/inference.pyx":417
 *                     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 = 417; __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":418
 * 
 *                 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":421
 * 
 * 
 *     if seen_complex:             # <<<<<<<<<<<<<<
 *         return complexes
 *     elif seen_float:
 */
  __pyx_t_15 = (__pyx_v_seen_complex != 0);
  if (__pyx_t_15) {

    /* "pandas/src/inference.pyx":422
 * 
 *     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":423
 *     if seen_complex:
 *         return complexes
 *     elif seen_float:             # <<<<<<<<<<<<<<
 *         return floats
 *     else:
 */
  __pyx_t_15 = (__pyx_v_seen_float != 0);
  if (__pyx_t_15) {

    /* "pandas/src/inference.pyx":424
 *         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":426
 *         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_149maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_148maybe_convert_objects[] = "\n    Type inference function-- convert object array to proper dtype\n    ";
static PyMethodDef __pyx_mdef_6pandas_3lib_149maybe_convert_objects = {__Pyx_NAMESTR("maybe_convert_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_149maybe_convert_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_148maybe_convert_objects)};
static PyObject *__pyx_pw_6pandas_3lib_149maybe_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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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,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__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--; }
        }
      }
      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 = 428; __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_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 = 428; __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 = 429; __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 = 429; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_convert_datetime = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maybe_convert_objects", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __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 = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_148maybe_convert_objects(__pyx_self, __pyx_v_objects, __pyx_v_try_float, __pyx_v_safe, __pyx_v_convert_datetime);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":428
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0, bint convert_datetime=0):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_3lib_148maybe_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) {
  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;
  int __pyx_v_seen_float;
  int __pyx_v_seen_complex;
  int __pyx_v_seen_datetime;
  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;
  __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_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;
  __pyx_t_5numpy_float64_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __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;
  double __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  int __pyx_t_37;
  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_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 = 428; __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":440
 *         ndarray[uint8_t] bools
 *         ndarray[int64_t] idatetimes
 *         bint seen_float = 0             # <<<<<<<<<<<<<<
 *         bint seen_complex = 0
 *         bint seen_datetime = 0
 */
  __pyx_v_seen_float = 0;

  /* "pandas/src/inference.pyx":441
 *         ndarray[int64_t] idatetimes
 *         bint seen_float = 0
 *         bint seen_complex = 0             # <<<<<<<<<<<<<<
 *         bint seen_datetime = 0
 *         bint seen_int = 0
 */
  __pyx_v_seen_complex = 0;

  /* "pandas/src/inference.pyx":442
 *         bint seen_float = 0
 *         bint seen_complex = 0
 *         bint seen_datetime = 0             # <<<<<<<<<<<<<<
 *         bint seen_int = 0
 *         bint seen_bool = 0
 */
  __pyx_v_seen_datetime = 0;

  /* "pandas/src/inference.pyx":443
 *         bint seen_complex = 0
 *         bint seen_datetime = 0
 *         bint seen_int = 0             # <<<<<<<<<<<<<<
 *         bint seen_bool = 0
 *         bint seen_object = 0
 */
  __pyx_v_seen_int = 0;

  /* "pandas/src/inference.pyx":444
 *         bint seen_datetime = 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":445
 *         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":446
 *         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":447
 *         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":451
 *         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 = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":453
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_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 = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __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 = 453; __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":454
 * 
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __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 = 454; __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 = 454; __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 = 454; __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 = 454; __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 = 454; __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 = 454; __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 = 454; __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":455
 *     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)
 *     datetimes = np.empty(n, dtype='M8[ns]')
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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":456
 *     complexes = np.empty(n, dtype='c16')
 *     ints = np.empty(n, dtype='i8')
 *     bools = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 *     datetimes = np.empty(n, dtype='M8[ns]')
 *     idatetimes = datetimes.view(np.int64)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __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 = 456; __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 = 456; __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 = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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":457
 *     ints = np.empty(n, dtype='i8')
 *     bools = np.empty(n, dtype=np.uint8)
 *     datetimes = np.empty(n, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *     idatetimes = datetimes.view(np.int64)
 * 
 */
  __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __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 = 457; __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 = 457; __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 = 457; __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_61)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __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 = 457; __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":458
 *     bools = np.empty(n, dtype=np.uint8)
 *     datetimes = np.empty(n, dtype='M8[ns]')
 *     idatetimes = datetimes.view(np.int64)             # <<<<<<<<<<<<<<
 * 
 *     onan = np.nan
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetimes, __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 458; __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 = 458; __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 = 458; __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 = 458; __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 = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_15 = 0;
  __pyx_v_idatetimes = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/src/inference.pyx":460
 *     idatetimes = datetimes.view(np.int64)
 * 
 *     onan = np.nan             # <<<<<<<<<<<<<<
 *     fnan = np.nan
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_onan = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "pandas/src/inference.pyx":461
 * 
 *     onan = np.nan
 *     fnan = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_16 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_fnan = __pyx_t_16;

  /* "pandas/src/inference.pyx":463
 *     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":464
 * 
 *     for i from 0 <= i < n:
 *         val = objects[i]             # <<<<<<<<<<<<<<
 * 
 *         if val is None:
 */
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_objects.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_17 >= __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 = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objects.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_objects.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/src/inference.pyx":466
 *         val = objects[i]
 * 
 *         if val is None:             # <<<<<<<<<<<<<<
 *             seen_null = 1
 *             floats[i] = complexes[i] = fnan
 */
    __pyx_t_18 = (__pyx_v_val == Py_None);
    __pyx_t_19 = (__pyx_t_18 != 0);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":467
 * 
 *         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":468
 *         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 = 468; __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 = 468; __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_L5;
    }

    /* "pandas/src/inference.pyx":469
 *             seen_null = 1
 *             floats[i] = complexes[i] = fnan
 *         elif util.is_bool_object(val):             # <<<<<<<<<<<<<<
 *             seen_bool = 1
 *             bools[i] = val
 */
    __pyx_t_19 = (is_bool_object(__pyx_v_val) != 0);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":470
 *             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":471
 *         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 = 471; __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 = 471; __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_L5;
    }

    /* "pandas/src/inference.pyx":472
 *             seen_bool = 1
 *             bools[i] = val
 *         elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = complexes[i] = val
 *             seen_float = 1
 */
    __pyx_t_19 = (is_float_object(__pyx_v_val) != 0);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":473
 *             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_16 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_16 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __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 = 473; __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_16;
      __pyx_t_25 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __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 = 473; __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":474
 *         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_L5;
    }

    /* "pandas/src/inference.pyx":475
 *             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_19 = (is_datetime64_object(__pyx_v_val) != 0);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":476
 *             seen_float = 1
 *         elif util.is_datetime64_object(val):
 *             if convert_datetime:             # <<<<<<<<<<<<<<
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value
 *                 seen_datetime = 1
 */
      __pyx_t_19 = (__pyx_v_convert_datetime != 0);
      if (__pyx_t_19) {

        /* "pandas/src/inference.pyx":477
 *         elif util.is_datetime64_object(val):
 *             if convert_datetime:
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value             # <<<<<<<<<<<<<<
 *                 seen_datetime = 1
 *             else:
 */
        __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__value); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_27 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_13); if (unlikely((__pyx_t_27 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 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 = 477; __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":478
 *             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_L6;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":480
 *                 seen_datetime = 1
 *             else:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *                 # objects[i] = val.astype('O')
 *                 break
 */
        __pyx_v_seen_object = 1;

        /* "pandas/src/inference.pyx":482
 *                 seen_object = 1
 *                 # objects[i] = val.astype('O')
 *                 break             # <<<<<<<<<<<<<<
 *         elif util.is_integer_object(val):
 *             seen_int = 1
 */
        goto __pyx_L4_break;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":483
 *                 # objects[i] = val.astype('O')
 *                 break
 *         elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             seen_int = 1
 *             floats[i] = <float64_t> val
 */
    __pyx_t_19 = (is_integer_object(__pyx_v_val) != 0);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":484
 *                 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":485
 *         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_16 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_16 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_29 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_29 < 0) {
        __pyx_t_29 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_29 >= __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 = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_floats.diminfo[0].strides) = ((__pyx_t_5numpy_float64_t)__pyx_t_16);

      /* "pandas/src/inference.pyx":486
 *             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 = 486; __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 = 486; __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_double_complex_from_parts(((double)__Pyx_CREAL(__pyx_t_25)), ((double)__Pyx_CIMAG(__pyx_t_25)));

      /* "pandas/src/inference.pyx":487
 *             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 != 0)) != 0);
      if (__pyx_t_19) {

        /* "pandas/src/inference.pyx":488
 *             complexes[i] = <double complex> val
 *             if not seen_null:
 *                 try:             # <<<<<<<<<<<<<<
 *                     ints[i] = val
 *                 except OverflowError:
 */
        {
          __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":489
 *             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 = 489; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            __pyx_t_31 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_31 < 0) {
              __pyx_t_31 += __pyx_pybuffernd_ints.diminfo[0].shape;
              if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_31 >= __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 = 489; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_27;
          }
          __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_L15_try_end;
          __pyx_L8_error:;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "pandas/src/inference.pyx":490
 *                 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_13, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GOTREF(__pyx_t_3);

            /* "pandas/src/inference.pyx":491
 *                     ints[i] = val
 *                 except OverflowError:
 *                     seen_object = 1             # <<<<<<<<<<<<<<
 *                     break
 *         elif util.is_complex_object(val):
 */
            __pyx_v_seen_object = 1;

            /* "pandas/src/inference.pyx":492
 *                 except OverflowError:
 *                     seen_object = 1
 *                     break             # <<<<<<<<<<<<<<
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 */
            goto __pyx_L16_except_break;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L9_exception_handled;
            __pyx_L16_except_break:;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L13_try_break;
          }
          __pyx_L10_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_L13_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_L4_break;
          __pyx_L9_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_L15_try_end:;
        }
        goto __pyx_L7;
      }
      __pyx_L7:;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":493
 *                     seen_object = 1
 *                     break
 *         elif util.is_complex_object(val):             # <<<<<<<<<<<<<<
 *             complexes[i] = val
 *             seen_complex = 1
 */
    __pyx_t_19 = (is_complex_object(__pyx_v_val) != 0);
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":494
 *                     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 = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_32 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_32 < 0) {
        __pyx_t_32 += __pyx_pybuffernd_complexes.diminfo[0].shape;
        if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_32 >= __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 = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_25;

      /* "pandas/src/inference.pyx":495
 *         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_L5;
    }

    /* "pandas/src/inference.pyx":496
 *             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_18 = (is_datetime64_object(__pyx_v_val) != 0);
    } else {
      __pyx_t_18 = __pyx_t_19;
    }
    if (__pyx_t_18) {

      /* "pandas/src/inference.pyx":497
 *             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
 */
      __pyx_t_18 = (__pyx_v_convert_datetime != 0);
      if (__pyx_t_18) {

        /* "pandas/src/inference.pyx":498
 *         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":499
 *             if convert_datetime:
 *                 seen_datetime = 1
 *                 idatetimes[i] = convert_to_tsobject(val, None, None).value             # <<<<<<<<<<<<<<
 *             else:
 *                 seen_object = 1
 */
        __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); 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_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__value); 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_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_33 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_33 < 0) {
          __pyx_t_33 += __pyx_pybuffernd_idatetimes.diminfo[0].shape;
          if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_33 >= __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 = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_27;
        goto __pyx_L18;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":501
 *                 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":502
 *             else:
 *                 seen_object = 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif try_float and not util.is_string_object(val):
 *             # this will convert Decimal objects
 */
        goto __pyx_L4_break;
      }
      __pyx_L18:;
      goto __pyx_L5;
    }

    /* "pandas/src/inference.pyx":503
 *                 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 != 0)) {
      __pyx_t_18 = ((!(is_string_object(__pyx_v_val) != 0)) != 0);
      __pyx_t_19 = __pyx_t_18;
    } else {
      __pyx_t_19 = (__pyx_v_try_float != 0);
    }
    if (__pyx_t_19) {

      /* "pandas/src/inference.pyx":505
 *         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_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":506
 *             # this will convert Decimal objects
 *             try:
 *                 floats[i] = float(val)             # <<<<<<<<<<<<<<
 *                 complexes[i] = complex(val)
 *                 seen_float = 1
 */
          __pyx_t_34 = __Pyx_PyObject_AsDouble(__pyx_v_val); if (unlikely(__pyx_t_34 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
          __pyx_t_35 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_35 < 0) {
            __pyx_t_35 += __pyx_pybuffernd_floats.diminfo[0].shape;
            if (unlikely(__pyx_t_35 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_35 >= __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 = 506; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_34;

          /* "pandas/src/inference.pyx":507
 *             try:
 *                 floats[i] = float(val)
 *                 complexes[i] = complex(val)             # <<<<<<<<<<<<<<
 *                 seen_float = 1
 *             except Exception:
 */
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L19_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_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyComplex_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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 = 507; __pyx_clineno = __LINE__; goto __pyx_L19_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_complexes.diminfo[0].shape;
            if (unlikely(__pyx_t_36 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_36 >= __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_25;

          /* "pandas/src/inference.pyx":508
 *                 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_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_L26_try_end;
        __pyx_L19_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pandas/src/inference.pyx":509
 *                 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_4, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_13);

          /* "pandas/src/inference.pyx":510
 *                 seen_float = 1
 *             except Exception:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
          __pyx_v_seen_object = 1;

          /* "pandas/src/inference.pyx":511
 *             except Exception:
 *                 seen_object = 1
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             seen_object = 1
 */
          goto __pyx_L27_except_break;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L20_exception_handled;
          __pyx_L27_except_break:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L24_try_break;
        }
        __pyx_L21_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_L24_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_L4_break;
        __pyx_L20_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_L26_try_end:;
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":513
 *                 break
 *         else:
 *             seen_object = 1             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_seen_object = 1;

      /* "pandas/src/inference.pyx":514
 *         else:
 *             seen_object = 1
 *             break             # <<<<<<<<<<<<<<
 * 
 *     seen_numeric = seen_complex or seen_float or seen_int
 */
      goto __pyx_L4_break;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "pandas/src/inference.pyx":516
 *             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_18 = __pyx_t_19;
  } else {
    __pyx_t_18 = __pyx_v_seen_complex;
  }
  __pyx_v_seen_numeric = __pyx_t_18;

  /* "pandas/src/inference.pyx":518
 *     seen_numeric = seen_complex or seen_float or seen_int
 * 
 *     if not seen_object:             # <<<<<<<<<<<<<<
 * 
 *         if not safe:
 */
  __pyx_t_18 = ((!(__pyx_v_seen_object != 0)) != 0);
  if (__pyx_t_18) {

    /* "pandas/src/inference.pyx":520
 *     if not seen_object:
 * 
 *         if not safe:             # <<<<<<<<<<<<<<
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime:
 */
    __pyx_t_18 = ((!(__pyx_v_safe != 0)) != 0);
    if (__pyx_t_18) {

      /* "pandas/src/inference.pyx":521
 * 
 *         if not safe:
 *             if seen_null:             # <<<<<<<<<<<<<<
 *                 if not seen_bool and not seen_datetime:
 *                     if seen_complex:
 */
      __pyx_t_18 = (__pyx_v_seen_null != 0);
      if (__pyx_t_18) {

        /* "pandas/src/inference.pyx":522
 *         if not safe:
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime:             # <<<<<<<<<<<<<<
 *                     if seen_complex:
 *                         return complexes
 */
        __pyx_t_18 = ((!(__pyx_v_seen_bool != 0)) != 0);
        if (__pyx_t_18) {
          __pyx_t_19 = ((!(__pyx_v_seen_datetime != 0)) != 0);
          __pyx_t_37 = __pyx_t_19;
        } else {
          __pyx_t_37 = __pyx_t_18;
        }
        if (__pyx_t_37) {

          /* "pandas/src/inference.pyx":523
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime:
 *                     if seen_complex:             # <<<<<<<<<<<<<<
 *                         return complexes
 *                     elif seen_float or seen_int:
 */
          __pyx_t_37 = (__pyx_v_seen_complex != 0);
          if (__pyx_t_37) {

            /* "pandas/src/inference.pyx":524
 *                 if not seen_bool and not seen_datetime:
 *                     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_L33;
          }

          /* "pandas/src/inference.pyx":525
 *                     if seen_complex:
 *                         return complexes
 *                     elif seen_float or seen_int:             # <<<<<<<<<<<<<<
 *                         return floats
 *             else:
 */
          if (!(__pyx_v_seen_float != 0)) {
            __pyx_t_37 = (__pyx_v_seen_int != 0);
          } else {
            __pyx_t_37 = (__pyx_v_seen_float != 0);
          }
          if (__pyx_t_37) {

            /* "pandas/src/inference.pyx":526
 *                         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_L33;
          }
          __pyx_L33:;
          goto __pyx_L32;
        }
        __pyx_L32:;
        goto __pyx_L31;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":528
 *                         return floats
 *             else:
 *                 if not seen_bool:             # <<<<<<<<<<<<<<
 *                     if seen_datetime:
 *                         if not seen_numeric:
 */
        __pyx_t_37 = ((!(__pyx_v_seen_bool != 0)) != 0);
        if (__pyx_t_37) {

          /* "pandas/src/inference.pyx":529
 *             else:
 *                 if not seen_bool:
 *                     if seen_datetime:             # <<<<<<<<<<<<<<
 *                         if not seen_numeric:
 *                             return datetimes
 */
          __pyx_t_37 = (__pyx_v_seen_datetime != 0);
          if (__pyx_t_37) {

            /* "pandas/src/inference.pyx":530
 *                 if not seen_bool:
 *                     if seen_datetime:
 *                         if not seen_numeric:             # <<<<<<<<<<<<<<
 *                             return datetimes
 *                     else:
 */
            __pyx_t_37 = ((!(__pyx_v_seen_numeric != 0)) != 0);
            if (__pyx_t_37) {

              /* "pandas/src/inference.pyx":531
 *                     if seen_datetime:
 *                         if not seen_numeric:
 *                             return datetimes             # <<<<<<<<<<<<<<
 *                     else:
 *                         if seen_complex:
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(__pyx_v_datetimes);
              __pyx_r = __pyx_v_datetimes;
              goto __pyx_L0;
              goto __pyx_L36;
            }
            __pyx_L36:;
            goto __pyx_L35;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":533
 *                             return datetimes
 *                     else:
 *                         if seen_complex:             # <<<<<<<<<<<<<<
 *                             return complexes
 *                         elif seen_float:
 */
            __pyx_t_37 = (__pyx_v_seen_complex != 0);
            if (__pyx_t_37) {

              /* "pandas/src/inference.pyx":534
 *                     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_L37;
            }

            /* "pandas/src/inference.pyx":535
 *                         if seen_complex:
 *                             return complexes
 *                         elif seen_float:             # <<<<<<<<<<<<<<
 *                             return floats
 *                         elif seen_int:
 */
            __pyx_t_37 = (__pyx_v_seen_float != 0);
            if (__pyx_t_37) {

              /* "pandas/src/inference.pyx":536
 *                             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_L37;
            }

            /* "pandas/src/inference.pyx":537
 *                         elif seen_float:
 *                             return floats
 *                         elif seen_int:             # <<<<<<<<<<<<<<
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric:
 */
            __pyx_t_37 = (__pyx_v_seen_int != 0);
            if (__pyx_t_37) {

              /* "pandas/src/inference.pyx":538
 *                             return floats
 *                         elif seen_int:
 *                             return ints             # <<<<<<<<<<<<<<
 *                 elif not seen_datetime and not seen_numeric:
 *                     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_L37;
            }
            __pyx_L37:;
          }
          __pyx_L35:;
          goto __pyx_L34;
        }

        /* "pandas/src/inference.pyx":539
 *                         elif seen_int:
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric:             # <<<<<<<<<<<<<<
 *                     return bools.view(np.bool_)
 * 
 */
        __pyx_t_37 = ((!(__pyx_v_seen_datetime != 0)) != 0);
        if (__pyx_t_37) {
          __pyx_t_18 = ((!(__pyx_v_seen_numeric != 0)) != 0);
          __pyx_t_19 = __pyx_t_18;
        } else {
          __pyx_t_19 = __pyx_t_37;
        }
        if (__pyx_t_19) {

          /* "pandas/src/inference.pyx":540
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric:
 *                     return bools.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __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 = 540; __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_13, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 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_L34;
        }
        __pyx_L34:;
      }
      __pyx_L31:;
      goto __pyx_L30;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":544
 *         else:
 *             # don't cast int to float, etc.
 *             if seen_null:             # <<<<<<<<<<<<<<
 *                 if not seen_bool and not seen_datetime:
 *                     if seen_complex:
 */
      __pyx_t_19 = (__pyx_v_seen_null != 0);
      if (__pyx_t_19) {

        /* "pandas/src/inference.pyx":545
 *             # don't cast int to float, etc.
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime:             # <<<<<<<<<<<<<<
 *                     if seen_complex:
 *                         if not seen_int:
 */
        __pyx_t_19 = ((!(__pyx_v_seen_bool != 0)) != 0);
        if (__pyx_t_19) {
          __pyx_t_37 = ((!(__pyx_v_seen_datetime != 0)) != 0);
          __pyx_t_18 = __pyx_t_37;
        } else {
          __pyx_t_18 = __pyx_t_19;
        }
        if (__pyx_t_18) {

          /* "pandas/src/inference.pyx":546
 *             if seen_null:
 *                 if not seen_bool and not seen_datetime:
 *                     if seen_complex:             # <<<<<<<<<<<<<<
 *                         if not seen_int:
 *                             return complexes
 */
          __pyx_t_18 = (__pyx_v_seen_complex != 0);
          if (__pyx_t_18) {

            /* "pandas/src/inference.pyx":547
 *                 if not seen_bool and not seen_datetime:
 *                     if seen_complex:
 *                         if not seen_int:             # <<<<<<<<<<<<<<
 *                             return complexes
 *                     elif seen_float:
 */
            __pyx_t_18 = ((!(__pyx_v_seen_int != 0)) != 0);
            if (__pyx_t_18) {

              /* "pandas/src/inference.pyx":548
 *                     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_L41;
            }
            __pyx_L41:;
            goto __pyx_L40;
          }

          /* "pandas/src/inference.pyx":549
 *                         if not seen_int:
 *                             return complexes
 *                     elif seen_float:             # <<<<<<<<<<<<<<
 *                         if not seen_int:
 *                             return floats
 */
          __pyx_t_18 = (__pyx_v_seen_float != 0);
          if (__pyx_t_18) {

            /* "pandas/src/inference.pyx":550
 *                             return complexes
 *                     elif seen_float:
 *                         if not seen_int:             # <<<<<<<<<<<<<<
 *                             return floats
 *             else:
 */
            __pyx_t_18 = ((!(__pyx_v_seen_int != 0)) != 0);
            if (__pyx_t_18) {

              /* "pandas/src/inference.pyx":551
 *                     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_L42;
            }
            __pyx_L42:;
            goto __pyx_L40;
          }
          __pyx_L40:;
          goto __pyx_L39;
        }
        __pyx_L39:;
        goto __pyx_L38;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":553
 *                             return floats
 *             else:
 *                 if not seen_bool:             # <<<<<<<<<<<<<<
 *                     if seen_datetime:
 *                         if not seen_numeric:
 */
        __pyx_t_18 = ((!(__pyx_v_seen_bool != 0)) != 0);
        if (__pyx_t_18) {

          /* "pandas/src/inference.pyx":554
 *             else:
 *                 if not seen_bool:
 *                     if seen_datetime:             # <<<<<<<<<<<<<<
 *                         if not seen_numeric:
 *                             return datetimes
 */
          __pyx_t_18 = (__pyx_v_seen_datetime != 0);
          if (__pyx_t_18) {

            /* "pandas/src/inference.pyx":555
 *                 if not seen_bool:
 *                     if seen_datetime:
 *                         if not seen_numeric:             # <<<<<<<<<<<<<<
 *                             return datetimes
 *                     else:
 */
            __pyx_t_18 = ((!(__pyx_v_seen_numeric != 0)) != 0);
            if (__pyx_t_18) {

              /* "pandas/src/inference.pyx":556
 *                     if seen_datetime:
 *                         if not seen_numeric:
 *                             return datetimes             # <<<<<<<<<<<<<<
 *                     else:
 *                         if seen_complex:
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(__pyx_v_datetimes);
              __pyx_r = __pyx_v_datetimes;
              goto __pyx_L0;
              goto __pyx_L45;
            }
            __pyx_L45:;
            goto __pyx_L44;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":558
 *                             return datetimes
 *                     else:
 *                         if seen_complex:             # <<<<<<<<<<<<<<
 *                             if not seen_int:
 *                                 return complexes
 */
            __pyx_t_18 = (__pyx_v_seen_complex != 0);
            if (__pyx_t_18) {

              /* "pandas/src/inference.pyx":559
 *                     else:
 *                         if seen_complex:
 *                             if not seen_int:             # <<<<<<<<<<<<<<
 *                                 return complexes
 *                         elif seen_float:
 */
              __pyx_t_18 = ((!(__pyx_v_seen_int != 0)) != 0);
              if (__pyx_t_18) {

                /* "pandas/src/inference.pyx":560
 *                         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_L47;
              }
              __pyx_L47:;
              goto __pyx_L46;
            }

            /* "pandas/src/inference.pyx":561
 *                             if not seen_int:
 *                                 return complexes
 *                         elif seen_float:             # <<<<<<<<<<<<<<
 *                             if not seen_int:
 *                                 return floats
 */
            __pyx_t_18 = (__pyx_v_seen_float != 0);
            if (__pyx_t_18) {

              /* "pandas/src/inference.pyx":562
 *                                 return complexes
 *                         elif seen_float:
 *                             if not seen_int:             # <<<<<<<<<<<<<<
 *                                 return floats
 *                         elif seen_int:
 */
              __pyx_t_18 = ((!(__pyx_v_seen_int != 0)) != 0);
              if (__pyx_t_18) {

                /* "pandas/src/inference.pyx":563
 *                         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_L48;
              }
              __pyx_L48:;
              goto __pyx_L46;
            }

            /* "pandas/src/inference.pyx":564
 *                             if not seen_int:
 *                                 return floats
 *                         elif seen_int:             # <<<<<<<<<<<<<<
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric:
 */
            __pyx_t_18 = (__pyx_v_seen_int != 0);
            if (__pyx_t_18) {

              /* "pandas/src/inference.pyx":565
 *                                 return floats
 *                         elif seen_int:
 *                             return ints             # <<<<<<<<<<<<<<
 *                 elif not seen_datetime and not seen_numeric:
 *                     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_L46;
            }
            __pyx_L46:;
          }
          __pyx_L44:;
          goto __pyx_L43;
        }

        /* "pandas/src/inference.pyx":566
 *                         elif seen_int:
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric:             # <<<<<<<<<<<<<<
 *                     return bools.view(np.bool_)
 * 
 */
        __pyx_t_18 = ((!(__pyx_v_seen_datetime != 0)) != 0);
        if (__pyx_t_18) {
          __pyx_t_19 = ((!(__pyx_v_seen_numeric != 0)) != 0);
          __pyx_t_37 = __pyx_t_19;
        } else {
          __pyx_t_37 = __pyx_t_18;
        }
        if (__pyx_t_37) {

          /* "pandas/src/inference.pyx":567
 *                             return ints
 *                 elif not seen_datetime and not seen_numeric:
 *                     return bools.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 *     return objects
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_13);
          __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 = 567; __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 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 567; __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_r = __pyx_t_13;
          __pyx_t_13 = 0;
          goto __pyx_L0;
          goto __pyx_L43;
        }
        __pyx_L43:;
      }
      __pyx_L38:;
    }
    __pyx_L30:;
    goto __pyx_L29;
  }
  __pyx_L29:;

  /* "pandas/src/inference.pyx":569
 *                     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_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_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(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_onan);
  __Pyx_XDECREF(__pyx_v_datetimes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_3lib_151convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_151convert_sql_column = {__Pyx_NAMESTR("convert_sql_column"), (PyCFunction)__pyx_pw_6pandas_3lib_151convert_sql_column, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_151convert_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_150convert_sql_column(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/inference.pyx":572
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */

static PyObject *__pyx_pf_6pandas_3lib_150convert_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":573
 * 
 * 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_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __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 = 573; __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 = 573; __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 = 573; __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 = 573; __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_153try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_153try_parse_dates = {__Pyx_NAMESTR("try_parse_dates"), (PyCFunction)__pyx_pw_6pandas_3lib_153try_parse_dates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_153try_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":575
 *     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_62;

    /* "pandas/src/inference.pyx":576
 * 
 * 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 = 575; __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 = 575; __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 = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_152try_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":595
 *             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(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  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;
  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__try_parse_dates *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pandas/src/inference.pyx":596
 *         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":597
 *             def parse_date(s):
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     return s
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_datetime)) { __Pyx_RaiseClosureNameError("datetime"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_datetime, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __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 = 597; __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_63));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_63));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
      __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 = 597; __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":598
 *                 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 = 598; __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":599
 *                     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":593
 *         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 = 593; __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 = 593; __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 = 593; __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 = 593; __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 = 593; __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 = 593; __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 = 593; __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 = 593; __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":575
 *     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_152try_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;
  CYTHON_UNUSED PyObject *__pyx_v_timedelta = NULL;
  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
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject **__pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  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("try_parse_dates", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(__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 = 575; __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":581
 *         ndarray[object] result
 * 
 *     from datetime import datetime, timedelta             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 581; __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_INCREF(((PyObject *)__pyx_n_s__timedelta));
  PyList_SET_ITEM(__pyx_t_1, 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_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 581; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 581; __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":583
 *     from datetime import datetime, timedelta
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":584
 * 
 *     n = len(values)
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if parser is None:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __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 = 584; __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 = 584; __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 = 584; __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 = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __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 = 584; __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":586
 *     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);
  __pyx_t_12 = (__pyx_t_11 != 0);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":587
 * 
 *     if parser is None:
 *         if default is None: # GH2618             # <<<<<<<<<<<<<<
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)
 */
    __pyx_t_12 = (__pyx_cur_scope->__pyx_v_default == Py_None);
    __pyx_t_11 = (__pyx_t_12 != 0);
    if (__pyx_t_11) {

      /* "pandas/src/inference.pyx":588
 *     if parser is None:
 *         if default is None: # GH2618
 *            date=datetime.now()             # <<<<<<<<<<<<<<
 *            default=datetime(date.year,date.month,1)
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_datetime, __pyx_n_s__now); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 588; __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 = 588; __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":589
 *         if default is None: # GH2618
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s__month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __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 = 589; __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(__pyx_cur_scope->__pyx_v_datetime, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __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":591
 *            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":592
 * 
 *         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 = 592; __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_64), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __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 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s__parse); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __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":593
 *         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, __pyx_n_s_65, ((PyObject*)__pyx_cur_scope), __pyx_n_s_66, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __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_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pandas/src/inference.pyx":594
 *             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 = 594; __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":595
 *             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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date, 0, __pyx_n_s_70, ((PyObject*)__pyx_cur_scope), __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_68)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L7_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_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":601
 *                     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":602
 *         # EAFP here
 *         try:
 *             for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *                 if values[i] == '':
 *                     result[i] = np.nan
 */
        __pyx_t_3 = __pyx_v_n;
        for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

          /* "pandas/src/inference.pyx":603
 *         try:
 *             for i from 0 <= i < n:
 *                 if values[i] == '':             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
          __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 = 603; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          }
          __pyx_t_2 = (PyObject *) *__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_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_71), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __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 = 603; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_11) {

            /* "pandas/src/inference.pyx":604
 *             for i from 0 <= i < n:
 *                 if values[i] == '':
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 *                     result[i] = parse_date(values[i])
 */
            __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_14 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_14 < 0) {
              __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_14 >= __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 = 604; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            }
            __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_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;
            goto __pyx_L25;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":606
 *                     result[i] = np.nan
 *                 else:
 *                     result[i] = parse_date(values[i])             # <<<<<<<<<<<<<<
 *         except Exception:
 *             # failed
 */
            __pyx_t_16 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_16 < 0) {
              __pyx_t_16 += __pyx_pybuffernd_values.diminfo[0].shape;
              if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_16 >= __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 = 606; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            }
            __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __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 = 606; __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 = 606; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(((PyObject *)__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_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 = 606; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            }
            __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __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_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_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/src/inference.pyx":607
 *                 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 = 607; __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":609
 *         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":611
 *             return values
 *     else:
 *         parse_date = parser             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __Pyx_INCREF(__pyx_v_parser);
    __pyx_v_parse_date = __pyx_v_parser;

    /* "pandas/src/inference.pyx":613
 *         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":614
 * 
 *         try:
 *             for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *                 if values[i] == '':
 *                     result[i] = np.nan
 */
        __pyx_t_3 = __pyx_v_n;
        for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

          /* "pandas/src/inference.pyx":615
 *         try:
 *             for i from 0 <= i < n:
 *                 if values[i] == '':             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_18 >= __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          }
          __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_4);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_71), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_11) {

            /* "pandas/src/inference.pyx":616
 *             for i from 0 <= i < n:
 *                 if values[i] == '':
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 *                     result[i] = parse_date(values[i])
 */
            __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_19 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_19 < 0) {
              __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_19 >= __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 = 616; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            }
            __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_15);
            __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_15);
            *__pyx_t_15 = __pyx_t_4;
            __Pyx_GIVEREF(*__pyx_t_15);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L38;
          }
          /*else*/ {

            /* "pandas/src/inference.pyx":618
 *                     result[i] = np.nan
 *                 else:
 *                     result[i] = parse_date(values[i])             # <<<<<<<<<<<<<<
 *         except Exception:
 *             # raise if passed parser and it failed
 */
            __pyx_t_20 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_20 < 0) {
              __pyx_t_20 += __pyx_pybuffernd_values.diminfo[0].shape;
              if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_20 >= __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            }
            __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __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 = 618; __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
            __pyx_t_21 = __pyx_v_i;
            __pyx_t_7 = -1;
            if (__pyx_t_21 < 0) {
              __pyx_t_21 += __pyx_pybuffernd_result.diminfo[0].shape;
              if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
            } else if (unlikely(__pyx_t_21 >= __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
            }
            __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_15);
            __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_15);
            *__pyx_t_15 = __pyx_t_4;
            __Pyx_GIVEREF(*__pyx_t_15);
            __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_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pandas/src/inference.pyx":619
 *                 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 = 619; __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":621
 *         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 = 621; __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":623
 *             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_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_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_timedelta);
  __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_155try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_155try_parse_date_and_time = {__Pyx_NAMESTR("try_parse_date_and_time"), (PyCFunction)__pyx_pw_6pandas_3lib_155try_parse_date_and_time, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_155try_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":626
 * 
 * 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_72;

    /* "pandas/src/inference.pyx":627
 * 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 = 625; __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 = 625; __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 = 625; __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 = 625; __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 = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_154try_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":648
 *             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":649
 *         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":650
 *             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 = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __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 = 650; __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_63));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_63));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
      __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 = 650; __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":651
 *                 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 = 651; __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":652
 *                     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":661
 *             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":662
 *         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":663
 *             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 = 663; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_time, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __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 = 663; __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_73));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_73));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
      __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 = 663; __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":664
 *                 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 = 664; __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":665
 *                     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":646
 *         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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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":659
 *         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 = 659; __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 = 659; __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 = 659; __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":625
 *     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_154try_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;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  PyObject **__pyx_t_19;
  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_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(__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 = 625; __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 = 625; __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":632
 *         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 = 632; __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 = 632; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __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":634
 *     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 = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":635
 * 
 *     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 = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0);
  if (__pyx_t_4) {

    /* "pandas/src/inference.pyx":636
 *     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_75), NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":637
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 637; __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 = 637; __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 = 637; __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 = 637; __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 = 637; __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 = 637; __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 = 637; __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 = 637; __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":639
 *     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);
  __pyx_t_12 = (__pyx_t_4 != 0);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":640
 * 
 *     if date_parser is None:
 *         if default is None: # GH2618             # <<<<<<<<<<<<<<
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)
 */
    __pyx_t_12 = (__pyx_cur_scope->__pyx_v_default == Py_None);
    __pyx_t_4 = (__pyx_t_12 != 0);
    if (__pyx_t_4) {

      /* "pandas/src/inference.pyx":641
 *     if date_parser is None:
 *         if default is None: # GH2618
 *            date=datetime.now()             # <<<<<<<<<<<<<<
 *            default=datetime(date.year,date.month,1)
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s__now); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __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 = 641; __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":642
 *         if default is None: # GH2618
 *            date=datetime.now()
 *            default=datetime(date.year,date.month,1)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __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 = 642; __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 = 642; __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":644
 *            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":645
 * 
 *         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 = 645; __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_64), ((PyObject *)__pyx_t_6), -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __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 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s__parse); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __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":646
 *         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, __pyx_n_s_76, ((PyObject*)__pyx_cur_scope), __pyx_n_s_66, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __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":647
 *             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 = 647; __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":648
 *             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, __pyx_n_s_79, ((PyObject*)__pyx_cur_scope), __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_78)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __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":654
 *                     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":656
 *         parse_date = date_parser
 * 
 *     if time_parser is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from dateutil.parser import parse
 */
  __pyx_t_4 = (__pyx_v_time_parser == Py_None);
  __pyx_t_12 = (__pyx_t_4 != 0);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":657
 * 
 *     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":658
 *     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 = 658; __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_64), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __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 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s__parse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __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":659
 *         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, __pyx_n_s_76, ((PyObject*)__pyx_cur_scope), __pyx_n_s_66, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __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":660
 *             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 = 660; __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":661
 *             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, __pyx_n_s_82, ((PyObject*)__pyx_cur_scope), __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_81)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __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":668
 * 
 *     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":670
 *         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":671
 * 
 *     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_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_dates.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __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 = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_dates.rcbuffer->pybuffer.buf, __pyx_t_13, __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 = 671; __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 = 671; __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 = 671; __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 = 671; __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":672
 *     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_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_times.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __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 = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_times.rcbuffer->pybuffer.buf, __pyx_t_14, __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 = 672; __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 = 672; __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 = 672; __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 = 672; __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":673
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);

    /* "pandas/src/inference.pyx":674
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s__minute); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s__second); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = PyTuple_New(6); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_16);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_16 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;

    /* "pandas/src/inference.pyx":673
 *         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_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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_19);
    __Pyx_INCREF(__pyx_t_16); __Pyx_DECREF(*__pyx_t_19);
    *__pyx_t_19 = __pyx_t_16;
    __Pyx_GIVEREF(*__pyx_t_19);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }

  /* "pandas/src/inference.pyx":676
 *                              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_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  { 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_157try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_157try_parse_year_month_day = {__Pyx_NAMESTR("try_parse_year_month_day"), (PyCFunction)__pyx_pw_6pandas_3lib_157try_parse_year_month_day, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_157try_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 679; __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 = 679; __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 = 679; __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 = 679; __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 = 679; __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 = 679; __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 = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_156try_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":679
 * 
 * 
 * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months,             # <<<<<<<<<<<<<<
 *                              ndarray[object] days):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_156try_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 = 679; __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 = 679; __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 = 679; __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":685
 *         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 = 685; __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 = 685; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __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":687
 *     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 = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":688
 * 
 *     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 = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0);
  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 = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((__pyx_t_3 != __pyx_v_n) != 0);
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  if (__pyx_t_6) {

    /* "pandas/src/inference.pyx":689
 *     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_84), NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":690
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 690; __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 = 690; __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 = 690; __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 = 690; __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 = 690; __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 = 690; __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 = 690; __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 = 690; __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":692
 *     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":693
 * 
 *     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 = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = (PyObject *) *__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 = 693; __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 = 693; __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 = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = (PyObject *) *__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 = 693; __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 = 693; __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 = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = (PyObject *) *__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 = 693; __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 = 693; __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 = 693; __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 = 693; __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 = 693; __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":695
 *         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_159try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_159try_parse_datetime_components = {__Pyx_NAMESTR("try_parse_datetime_components"), (PyCFunction)__pyx_pw_6pandas_3lib_159try_parse_datetime_components, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_159try_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 698; __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 = 699; __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 = 700; __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 = 701; __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 = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_158try_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":697
 *     return result
 * 
 * def try_parse_datetime_components(ndarray[object] years,             # <<<<<<<<<<<<<<
 *                                   ndarray[object] months,
 *                                   ndarray[object] days,
 */

static PyObject *__pyx_pf_6pandas_3lib_158try_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_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;
  Py_ssize_t __pyx_t_18;
  double __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;
  PyObject *__pyx_t_24 = NULL;
  Py_ssize_t __pyx_t_25;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  Py_ssize_t __pyx_t_29;
  PyObject **__pyx_t_30;
  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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 697; __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 = 697; __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":710
 *         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 = 710; __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 = 710; __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 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __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":712
 *     from datetime import datetime
 * 
 *     n = len(years)             # <<<<<<<<<<<<<<
 *     if (len(months) != n and len(days) != n and len(hours) != n and
 *         len(minutes) != n and 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 = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/inference.pyx":713
 * 
 *     n = len(years)
 *     if (len(months) != n and len(days) != n and len(hours) != n and             # <<<<<<<<<<<<<<
 *         len(minutes) != n and 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 = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0);
  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 = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((__pyx_t_3 != __pyx_v_n) != 0);
    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 = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = ((__pyx_t_3 != __pyx_v_n) != 0);
      if (__pyx_t_6) {

        /* "pandas/src/inference.pyx":714
 *     n = len(years)
 *     if (len(months) != n and len(days) != n and len(hours) != n and
 *         len(minutes) != n and 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 = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = ((__pyx_t_3 != __pyx_v_n) != 0);
        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 = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = ((__pyx_t_3 != __pyx_v_n) != 0);
          __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":715
 *     if (len(months) != n and len(days) != n and len(hours) != n and
 *         len(minutes) != n and 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_86), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __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 = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":716
 *         len(minutes) != n and 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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 716; __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 = 716; __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 = 716; __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 = 716; __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 = 716; __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 = 716; __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 = 716; __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 = 716; __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":718
 *     result = np.empty(n, dtype='O')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         secs = int(seconds[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":719
 * 
 *     for i from 0 <= i < n:
 *         secs = int(seconds[i])             # <<<<<<<<<<<<<<
 * 
 *         micros = seconds[i] - 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 = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = (PyObject *) *__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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 719; __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 = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_11); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_secs = __pyx_t_13;

    /* "pandas/src/inference.pyx":721
 *         secs = int(seconds[i])
 * 
 *         micros = seconds[i] - secs             # <<<<<<<<<<<<<<
 *         if micros > 0:
 *             micros = micros * 1000000
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_pybuffernd_seconds.diminfo[0].shape;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_18 >= __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 = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seconds.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_11);
    __pyx_t_2 = PyInt_FromLong(__pyx_v_secs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = PyNumber_Subtract(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_micros = __pyx_t_19;

    /* "pandas/src/inference.pyx":722
 * 
 *         micros = seconds[i] - secs
 *         if micros > 0:             # <<<<<<<<<<<<<<
 *             micros = micros * 1000000
 * 
 */
    __pyx_t_5 = ((__pyx_v_micros > 0.0) != 0);
    if (__pyx_t_5) {

      /* "pandas/src/inference.pyx":723
 *         micros = seconds[i] - 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":725
 *             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_20 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_pybuffernd_years.diminfo[0].shape;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_20 >= __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_10 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_years.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_10);
    __pyx_t_2 = PyTuple_New(1); 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);
    PyTuple_SET_ITEM(__pyx_t_2, 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_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_21 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_pybuffernd_months.diminfo[0].shape;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_21 >= __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_months.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_11, 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_11), NULL); 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_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_t_22 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_22 < 0) {
      __pyx_t_22 += __pyx_pybuffernd_days.diminfo[0].shape;
      if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_22 >= __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_days.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_11);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

    /* "pandas/src/inference.pyx":726
 * 
 *         result[i] = datetime(int(years[i]), int(months[i]), int(days[i]),
 *                              int(hours[i]), int(minutes[i]), secs,             # <<<<<<<<<<<<<<
 *                              int(micros))
 * 
 */
    __pyx_t_23 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_23 < 0) {
      __pyx_t_23 += __pyx_pybuffernd_hours.diminfo[0].shape;
      if (unlikely(__pyx_t_23 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_23 >= __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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_hours.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __pyx_t_24 = PyTuple_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_24);
    PyTuple_SET_ITEM(__pyx_t_24, 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_24), NULL); 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_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
    __pyx_t_25 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_25 < 0) {
      __pyx_t_25 += __pyx_pybuffernd_minutes.diminfo[0].shape;
      if (unlikely(__pyx_t_25 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_25 >= __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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_24 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_minutes.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_24);
    __pyx_t_26 = PyTuple_New(1); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);
    PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_24);
    __Pyx_GIVEREF(__pyx_t_24);
    __pyx_t_24 = 0;
    __pyx_t_24 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_26), NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_24);
    __Pyx_DECREF(((PyObject *)__pyx_t_26)); __pyx_t_26 = 0;
    __pyx_t_26 = PyInt_FromLong(__pyx_v_secs); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);

    /* "pandas/src/inference.pyx":727
 *         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_27 = PyFloat_FromDouble(__pyx_v_micros); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_27);
    __pyx_t_28 = PyTuple_New(1); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_28);
    PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_27);
    __Pyx_GIVEREF(__pyx_t_27);
    __pyx_t_27 = 0;
    __pyx_t_27 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_28), NULL); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_27);
    __Pyx_DECREF(((PyObject *)__pyx_t_28)); __pyx_t_28 = 0;
    __pyx_t_28 = PyTuple_New(7); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_28);
    PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_28, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_28, 3, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_28, 4, __pyx_t_24);
    __Pyx_GIVEREF(__pyx_t_24);
    PyTuple_SET_ITEM(__pyx_t_28, 5, __pyx_t_26);
    __Pyx_GIVEREF(__pyx_t_26);
    PyTuple_SET_ITEM(__pyx_t_28, 6, __pyx_t_27);
    __Pyx_GIVEREF(__pyx_t_27);
    __pyx_t_10 = 0;
    __pyx_t_2 = 0;
    __pyx_t_11 = 0;
    __pyx_t_1 = 0;
    __pyx_t_24 = 0;
    __pyx_t_26 = 0;
    __pyx_t_27 = 0;
    __pyx_t_27 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_28), NULL); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_27);
    __Pyx_DECREF(((PyObject *)__pyx_t_28)); __pyx_t_28 = 0;

    /* "pandas/src/inference.pyx":725
 *             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_29 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_29 < 0) {
      __pyx_t_29 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_29 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_29 >= __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 = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_30 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_30);
    __Pyx_INCREF(__pyx_t_27); __Pyx_DECREF(*__pyx_t_30);
    *__pyx_t_30 = __pyx_t_27;
    __Pyx_GIVEREF(*__pyx_t_30);
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  }

  /* "pandas/src/inference.pyx":729
 *                              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_24);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  { 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_161sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_161sanitize_objects = {__Pyx_NAMESTR("sanitize_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_161sanitize_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_161sanitize_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_87;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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 = 731; __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 = 731; __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 = 731; __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 = 731; __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 = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_160sanitize_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":731
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                      convert_empty=True):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_160sanitize_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 = 731; __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":736
 *         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":737
 *         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 = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_memo = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/src/inference.pyx":739
 *         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 = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/inference.pyx":740
 * 
 *     n = len(values)
 *     onan = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __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_v_onan = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":742
 *     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":743
 * 
 *     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 = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = (PyObject *) *__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":744
 *     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 = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_6) {
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, ((PyObject *)__pyx_kp_s_71), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 744; __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 = 744; __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 = 744; __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":745
 *         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 = 745; __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":746
 *         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":747
 *             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 = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "pandas/src/inference.pyx":748
 *             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 = 748; __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 = 748; __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":750
 *             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 = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "pandas/src/inference.pyx":752
 *             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 = 752; __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_163maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_163maybe_convert_bool = {__Pyx_NAMESTR("maybe_convert_bool"), (PyCFunction)__pyx_pw_6pandas_3lib_163maybe_convert_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_163maybe_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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":755
 * 
 * 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 = 754; __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 = 754; __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 = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_162maybe_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":754
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr,             # <<<<<<<<<<<<<<
 *                        true_values=None, false_values=None):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_3lib_162maybe_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;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  PyArrayObject *__pyx_t_20 = 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 = 754; __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":761
 *         object val
 *         set true_vals, false_vals
 *         int na_count = 0             # <<<<<<<<<<<<<<
 * 
 *     n = len(arr)
 */
  __pyx_v_na_count = 0;

  /* "pandas/src/inference.pyx":763
 *         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 = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":764
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     # the defaults
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __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 = 764; __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 = 764; __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 = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __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 = 764; __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 = 764; __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 = 764; __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 = 764; __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":767
 * 
 *     # 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 = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__True)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__TRUE)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__true)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_true_vals = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/inference.pyx":768
 *     # 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 = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__False)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__FALSE)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__false)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_false_vals = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/inference.pyx":770
 *     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);
  __pyx_t_13 = (__pyx_t_12 != 0);
  if (__pyx_t_13) {

    /* "pandas/src/inference.pyx":771
 * 
 *     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 = 771; __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 = 771; __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 = 771; __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 = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/src/inference.pyx":773
 *         true_vals = true_vals | set(true_values)
 * 
 *     if false_values is not None:             # <<<<<<<<<<<<<<
 *         false_vals = false_vals | set(false_values)
 * 
 */
  __pyx_t_13 = (__pyx_v_false_values != Py_None);
  __pyx_t_12 = (__pyx_t_13 != 0);
  if (__pyx_t_12) {

    /* "pandas/src/inference.pyx":774
 * 
 *     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 = 774; __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 = 774; __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 = 774; __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 = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/src/inference.pyx":776
 *         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":777
 * 
 *     for i from 0 <= i < n:
 *         val = arr[i]             # <<<<<<<<<<<<<<
 * 
 *         if cpython.PyBool_Check(val):
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __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 = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __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":779
 *         val = arr[i]
 * 
 *         if cpython.PyBool_Check(val):             # <<<<<<<<<<<<<<
 *             if val is True:
 *                 result[i] = 1
 */
    __pyx_t_12 = (PyBool_Check(__pyx_v_val) != 0);
    if (__pyx_t_12) {

      /* "pandas/src/inference.pyx":780
 * 
 *         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 = 780; __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;
      __pyx_t_13 = (__pyx_t_12 != 0);
      if (__pyx_t_13) {

        /* "pandas/src/inference.pyx":781
 *         if cpython.PyBool_Check(val):
 *             if val is True:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i] = 0
 */
        __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 = 781; __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) = 1;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "pandas/src/inference.pyx":783
 *                 result[i] = 1
 *             else:
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 *         elif val in true_vals:
 *             result[i] = 1
 */
        __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 = 783; __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) = 0;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":784
 *             else:
 *                 result[i] = 0
 *         elif val in true_vals:             # <<<<<<<<<<<<<<
 *             result[i] = 1
 *         elif val in false_vals:
 */
    __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_true_vals), Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = (__pyx_t_13 != 0);
    if (__pyx_t_12) {

      /* "pandas/src/inference.pyx":785
 *                 result[i] = 0
 *         elif val in true_vals:
 *             result[i] = 1             # <<<<<<<<<<<<<<
 *         elif val in false_vals:
 *             result[i] = 0
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":786
 *         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 = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (__pyx_t_12 != 0);
    if (__pyx_t_13) {

      /* "pandas/src/inference.pyx":787
 *             result[i] = 1
 *         elif val in false_vals:
 *             result[i] = 0             # <<<<<<<<<<<<<<
 *         elif PyFloat_Check(val):
 *             result[i] = UINT8_MAX
 */
      __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 = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      goto __pyx_L7;
    }

    /* "pandas/src/inference.pyx":788
 *         elif val in false_vals:
 *             result[i] = 0
 *         elif PyFloat_Check(val):             # <<<<<<<<<<<<<<
 *             result[i] = UINT8_MAX
 *             na_count += 1
 */
    __pyx_t_13 = (PyFloat_Check(__pyx_v_val) != 0);
    if (__pyx_t_13) {

      /* "pandas/src/inference.pyx":789
 *             result[i] = 0
 *         elif PyFloat_Check(val):
 *             result[i] = UINT8_MAX             # <<<<<<<<<<<<<<
 *             na_count += 1
 *         else:
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __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 = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = UINT8_MAX;

      /* "pandas/src/inference.pyx":790
 *         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":792
 *             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":794
 *             return arr
 * 
 *     if na_count > 0:             # <<<<<<<<<<<<<<
 *         mask = result == UINT8_MAX
 *         arr = result.view(np.bool_).astype(object)
 */
  __pyx_t_13 = ((__pyx_v_na_count > 0) != 0);
  if (__pyx_t_13) {

    /* "pandas/src/inference.pyx":795
 * 
 *     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 = 795; __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 = 795; __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":796
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __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 = 796; __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 = 796; __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 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__astype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __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 = 796; __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 = 796; __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 = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_20 = ((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_20, &__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 = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_20 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pandas/src/inference.pyx":797
 *         mask = result == UINT8_MAX
 *         arr = result.view(np.bool_).astype(object)
 *         np.putmask(arr, mask, np.nan)             # <<<<<<<<<<<<<<
 *         return arr
 *     else:
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __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 = 797; __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 = 797; __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":798
 *         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":800
 *         return arr
 *     else:
 *         return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __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 = 800; __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 = 800; __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_165map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_164map_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_165map_infer_mask = {__Pyx_NAMESTR("map_infer_mask"), (PyCFunction)__pyx_pw_6pandas_3lib_165map_infer_mask, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_164map_infer_mask)};
static PyObject *__pyx_pw_6pandas_3lib_165map_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 803; __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 = 803; __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 = 803; __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 = 804; __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 = 803; __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 = 803; __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 = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_164map_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":803
 * 
 * 
 * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask,             # <<<<<<<<<<<<<<
 *                    bint convert=1):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_3lib_164map_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;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject **__pyx_t_17;
  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 = 803; __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":822
 *         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 = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":823
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if mask[i]:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __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 = 823; __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 = 823; __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 = 823; __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 = 823; __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 = 823; __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 = 823; __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 = 823; __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":824
 *     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":825
 *     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 = 825; __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)) != 0);
    if (__pyx_t_13) {

      /* "pandas/src/inference.pyx":826
 *     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 = 826; __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 = 826; __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":828
 *             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 = 828; __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 = 828; __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 = 828; __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 = 828; __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":831
 * 
 *             # 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 = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_13) {
        if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_14 = (PyArray_NDIM(((PyArrayObject *)__pyx_v_val)) == 0);
        __pyx_t_15 = __pyx_t_14;
      } else {
        __pyx_t_15 = __pyx_t_13;
      }
      if (__pyx_t_15) {

        /* "pandas/src/inference.pyx":833
 *             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 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __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 = 833; __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":835
 *                 val = val.item()
 * 
 *         result[i] = val             # <<<<<<<<<<<<<<
 * 
 *     if convert:
 */
    __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 = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_17);
    __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_17);
    *__pyx_t_17 = __pyx_v_val;
    __Pyx_GIVEREF(*__pyx_t_17);
  }

  /* "pandas/src/inference.pyx":837
 *         result[i] = val
 * 
 *     if convert:             # <<<<<<<<<<<<<<
 *         return maybe_convert_objects(result, try_float=0,
 *                                      convert_datetime=0)
 */
  __pyx_t_15 = (__pyx_v_convert != 0);
  if (__pyx_t_15) {

    /* "pandas/src/inference.pyx":838
 * 
 *     if convert:
 *         return maybe_convert_objects(result, try_float=0,             # <<<<<<<<<<<<<<
 *                                      convert_datetime=0)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __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 = 838; __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 = 838; __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 = 838; __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 = 838; __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 = 838; __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":841
 *                                      convert_datetime=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_167map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_3lib_166map_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_167map_infer = {__Pyx_NAMESTR("map_infer"), (PyCFunction)__pyx_pw_6pandas_3lib_167map_infer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_166map_infer)};
static PyObject *__pyx_pw_6pandas_3lib_167map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  int __pyx_v_convert;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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 = 843; __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 = 843; __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 = 843; __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 = 843; __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 = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_166map_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":843
 *     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_166map_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":861
 *         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 = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":862
 * 
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 862; __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 = 862; __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 = 862; __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 = 862; __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 = 862; __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 = 862; __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 = 862; __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 = 862; __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":863
 *     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":864
 *     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 = 864; __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 = 864; __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 = 864; __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 = 864; __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":867
 * 
 *         # 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 = 867; __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 = 867; __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 = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = (PyArray_NDIM(((PyArrayObject *)__pyx_v_val)) == 0);
      __pyx_t_14 = __pyx_t_13;
    } else {
      __pyx_t_14 = __pyx_t_12;
    }
    if (__pyx_t_14) {

      /* "pandas/src/inference.pyx":869
 *         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 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 869; __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 = 869; __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":871
 *             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 = 871; __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":873
 *         result[i] = val
 * 
 *     if convert:             # <<<<<<<<<<<<<<
 *         return maybe_convert_objects(result, try_float=0,
 *                                      convert_datetime=0)
 */
  __pyx_t_14 = (__pyx_v_convert != 0);
  if (__pyx_t_14) {

    /* "pandas/src/inference.pyx":874
 * 
 *     if convert:
 *         return maybe_convert_objects(result, try_float=0,             # <<<<<<<<<<<<<<
 *                                      convert_datetime=0)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 874; __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 = 874; __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 = 874; __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 = 874; __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 = 874; __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 = 874; __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":877
 *                                      convert_datetime=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_169to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_169to_object_array = {__Pyx_NAMESTR("to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_169to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_169to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_168to_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":880
 * 
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

static PyObject *__pyx_pf_6pandas_3lib_168to_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":886
 *         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 = 886; __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 = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":888
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "pandas/src/inference.pyx":889
 * 
 *     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":890
 *     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 = 890; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __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 = 890; __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":891
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 *         if tmp > k:             # <<<<<<<<<<<<<<
 *             k = tmp
 * 
 */
    __pyx_t_4 = ((__pyx_v_tmp > __pyx_v_k) != 0);
    if (__pyx_t_4) {

      /* "pandas/src/inference.pyx":892
 *         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":894
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 894; __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 = 894; __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 = 894; __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 = 894; __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 = 894; __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 = 894; __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 = 894; __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 = 894; __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 = 894; __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 = 894; __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":896
 *     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":897
 * 
 *     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 = 897; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 897; __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 = 897; __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":899
 *         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 = 899; __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 = 899; __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":900
 * 
 *         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 = 900; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 900; __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 = 900; __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":902
 *             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_171tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_171tuples_to_object_array = {__Pyx_NAMESTR("tuples_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_171tuples_to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_171tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_170tuples_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":904
 *     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_170tuples_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 = 904; __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":910
 *         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 = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":911
 * 
 *     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 = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = (PyObject *) *__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 = 911; __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":912
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 912; __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 = 912; __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 = 912; __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 = 912; __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 = 912; __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 = 912; __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 = 912; __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 = 912; __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 = 912; __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 = 912; __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":913
 *     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":914
 *     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 = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = (PyObject *) *__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 = 914; __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":915
 *     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":916
 *         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 = 916; __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, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 916; __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 = 916; __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":918
 *             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_173to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_173to_object_array_tuples = {__Pyx_NAMESTR("to_object_array_tuples"), (PyCFunction)__pyx_pw_6pandas_3lib_173to_object_array_tuples, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_173to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  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 = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_172to_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":920
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

static PyObject *__pyx_pf_6pandas_3lib_172to_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":926
 *         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 = 926; __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 = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":928
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "pandas/src/inference.pyx":929
 * 
 *     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":930
 *     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 = 930; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __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 = 930; __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":931
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 *         if tmp > k:             # <<<<<<<<<<<<<<
 *             k = tmp
 * 
 */
    __pyx_t_4 = ((__pyx_v_tmp > __pyx_v_k) != 0);
    if (__pyx_t_4) {

      /* "pandas/src/inference.pyx":932
 *         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":934
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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":936
 *     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":937
 * 
 *     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":938
 *     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 = 938; __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, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __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 = 938; __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":939
 *         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 = 939; __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 = 939; __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":940
 *             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 = 940; __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, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 940; __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 = 940; __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":941
 *             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 = 941; __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":943
 *     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":944
 *         # 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 = 944; __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, 1, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __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 = 944; __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 = 944; __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":945
 *         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 = 945; __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":946
 *             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, 0, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 946; __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 = 946; __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":948
 *                 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_175fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_3lib_175fast_multiget = {__Pyx_NAMESTR("fast_multiget"), (PyCFunction)__pyx_pw_6pandas_3lib_175fast_multiget, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_3lib_175fast_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_88;
    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 = 951; __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 = 951; __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 = 951; __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 = 951; __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 = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_3lib_174fast_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":951
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */

static PyObject *__pyx_pf_6pandas_3lib_174fast_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;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  PyObject **__pyx_t_12;
  Py_ssize_t __pyx_t_13;
  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":953
 * 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 = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/inference.pyx":955
 *         Py_ssize_t i, n = len(keys)
 *         object val
 *         ndarray[object] output = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __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 = 955; __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 = 955; __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 = 955; __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 = 955; __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 = 955; __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 = 955; __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 = 955; __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":957
 *         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) != 0);
  if (__pyx_t_7) {

    /* "pandas/src/inference.pyx":959
 *     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_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 959; __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 = 959; __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 = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_89), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 959; __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":961
 *         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":962
 * 
 *     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 = 962; __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":963
 *     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 = 963; __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 = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (__pyx_t_9) {

      /* "pandas/src/inference.pyx":964
 *         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 = 964; __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 = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_10 < 0) {
        __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_12);
      __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_12);
      *__pyx_t_12 = __pyx_t_4;
      __Pyx_GIVEREF(*__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "pandas/src/inference.pyx":966
 *             output[i] = mapping[val]
 *         else:
 *             output[i] = default             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(output)
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_output.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_12);
      __Pyx_INCREF(__pyx_v_default); __Pyx_DECREF(*__pyx_t_12);
      *__pyx_t_12 = __pyx_v_default;
      __Pyx_GIVEREF(*__pyx_t_12);
    }
    __pyx_L6:;
  }

  /* "pandas/src/inference.pyx":968
 *             output[i] = default
 * 
 *     return maybe_convert_objects(output)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 968; __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 = 968; __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 = 968; __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":122
 * 
 * 
 * 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":126
 *     cdef char *tmp
 * 
 *     if PyUnicode_Check(val):             # <<<<<<<<<<<<<<
 *         val = PyUnicode_AsASCIIString(val);
 * 
 */
  __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0);
  if (__pyx_t_1) {

    /* "datetime.pxd":127
 * 
 *     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 = 127; __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":129
 *         val = PyUnicode_AsASCIIString(val);
 * 
 *     tmp = val             # <<<<<<<<<<<<<<
 *     result = _cstring_to_dts(tmp, len(val), dts)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_tmp = __pyx_t_3;

  /* "datetime.pxd":130
 * 
 *     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 = 130; __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":132
 *     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) != 0);
  if (__pyx_t_1) {

    /* "datetime.pxd":133
 * 
 *     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 = 133; __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 = 133; __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_90), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __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 = 133; __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 = 133; __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 = 133; __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":135
 *         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":144
 *     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":145
 *                                      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":148
 * 
 * 
 * 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":150
 * 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":151
 *     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 = 151; __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":153
 *     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":154
 * 
 * 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":156
 *     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 = 154; __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":158
 *                                                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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0);

  /* "datetime.pxd":159
 * 
 * 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 = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val));

  /* "datetime.pxd":160
 * 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 = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val));

  /* "datetime.pxd":161
 *     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 = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val));

  /* "datetime.pxd":162
 *     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":163
 *     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":164
 *     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":165
 *     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":166
 *     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":167
 *     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_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":169
 *     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":171
 * 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 171; __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 = 171; __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":172
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year
 *     dts.month = val.month             # <<<<<<<<<<<<<<
 *     dts.day = val.day
 *     dts.hour = val.hour
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 172; __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 = 172; __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":173
 *     dts.year = val.year
 *     dts.month = val.month
 *     dts.day = val.day             # <<<<<<<<<<<<<<
 *     dts.hour = val.hour
 *     dts.min = val.minute
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 173; __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 = 173; __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":174
 *     dts.month = val.month
 *     dts.day = val.day
 *     dts.hour = val.hour             # <<<<<<<<<<<<<<
 *     dts.min = val.minute
 *     dts.sec = val.second
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 174; __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 = 174; __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":175
 *     dts.day = val.day
 *     dts.hour = val.hour
 *     dts.min = val.minute             # <<<<<<<<<<<<<<
 *     dts.sec = val.second
 *     dts.us = val.microsecond
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__minute); 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_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 = 175; __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":176
 *     dts.hour = val.hour
 *     dts.min = val.minute
 *     dts.sec = val.second             # <<<<<<<<<<<<<<
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__second); 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->sec = __pyx_t_3;

  /* "datetime.pxd":177
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__microsecond); 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->us = __pyx_t_3;

  /* "datetime.pxd":178
 *     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":179
 *     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":181
 *     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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_date_to_datetime64", 0);

  /* "datetime.pxd":183
 * 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 = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val));

  /* "datetime.pxd":184
 *                                         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 = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val));

  /* "datetime.pxd":185
 *     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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val));

  /* "datetime.pxd":186
 *     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":187
 *     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":188
 *     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_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED 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) != 0);
  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))) != 0);
  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) != 0);
  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) != 0)) != 0);
    __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_92), 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) != 0);
  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) != 0)) != 0);
    __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_94), 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.
 */
  __pyx_t_2 = (__pyx_v_copy_shape != 0);
  if (__pyx_t_2) {

    /* "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) != 0));

  /* "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 != 0)) != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0);
    __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 != 0)) != 0);
  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 == '>') != 0);
    if (__pyx_t_1) {
      __pyx_t_2 = (__pyx_v_little_endian != 0);
    } 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 == '<') != 0);
      if (__pyx_t_1) {
        __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0);
        __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_96), 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":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)
 */
    switch (__pyx_v_t) {

      /* "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"
 */
      case NPY_BYTE:
      __pyx_v_f = __pyx_k__b;
      break;

      /* "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"
 */
      case NPY_UBYTE:
      __pyx_v_f = __pyx_k__B;
      break;

      /* "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"
 */
      case NPY_SHORT:
      __pyx_v_f = __pyx_k__h;
      break;

      /* "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"
 */
      case NPY_USHORT:
      __pyx_v_f = __pyx_k__H;
      break;

      /* "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"
 */
      case NPY_INT:
      __pyx_v_f = __pyx_k__i;
      break;

      /* "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"
 */
      case NPY_UINT:
      __pyx_v_f = __pyx_k__I;
      break;

      /* "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"
 */
      case NPY_LONG:
      __pyx_v_f = __pyx_k__l;
      break;

      /* "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"
 */
      case NPY_ULONG:
      __pyx_v_f = __pyx_k__L;
      break;

      /* "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"
 */
      case NPY_LONGLONG:
      __pyx_v_f = __pyx_k__q;
      break;

      /* "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"
 */
      case NPY_ULONGLONG:
      __pyx_v_f = __pyx_k__Q;
      break;

      /* "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"
 */
      case NPY_FLOAT:
      __pyx_v_f = __pyx_k__f;
      break;

      /* "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"
 */
      case NPY_DOUBLE:
      __pyx_v_f = __pyx_k__d;
      break;

      /* "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"
 */
      case NPY_LONGDOUBLE:
      __pyx_v_f = __pyx_k__g;
      break;

      /* "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"
 */
      case NPY_CFLOAT:
      __pyx_v_f = __pyx_k__Zf;
      break;

      /* "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"
 */
      case NPY_CDOUBLE:
      __pyx_v_f = __pyx_k__Zd;
      break;

      /* "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:
 */
      case NPY_CLONGDOUBLE:
      __pyx_v_f = __pyx_k__Zg;
      break;

      /* "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)
 */
      case NPY_OBJECT:
      __pyx_v_f = __pyx_k__O;
      break;
      default:

      /* "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_97), __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;}
      break;
    }

    /* "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 CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED 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) != 0);
  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))) != 0);
  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_GOTREF(__pyx_t_3);
      __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;}
      __Pyx_GOTREF(__pyx_t_4);
      #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_99), 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 == '>') != 0);
    if (__pyx_t_7) {
      __pyx_t_8 = (__pyx_v_little_endian != 0);
    } 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 == '<') != 0);
      if (__pyx_t_7) {
        __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0);
        __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_100), 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) != 0)) != 0);
    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) != 0);
      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_102), 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_97), __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;
  int __pyx_t_2;
  __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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "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) != 0);
  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;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_at", 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) != 0);
  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_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 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_1) {

      /* "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_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (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_4);

  /* "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_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {
    __pyx_t_5 = ((__pyx_v_sz > 0) != 0);
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_1;
  }
  if (__pyx_t_6) {

    /* "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_6 = ((__pyx_v_i >= __pyx_v_sz) != 0);
  if (!__pyx_t_6) {
    __pyx_t_1 = ((__pyx_v_sz == 0) != 0);
    __pyx_t_5 = __pyx_t_1;
  } else {
    __pyx_t_5 = __pyx_t_6;
  }
  if (__pyx_t_5) {

    /* "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_104), 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;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_value_at", 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) != 0);
  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_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 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_1) {

      /* "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_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (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_4);

  /* "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_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "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_1 = ((__pyx_v_i >= __pyx_v_sz) != 0);
  if (__pyx_t_1) {

    /* "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_105), 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_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -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 = __Pyx_PyObject_GetAttrStr(__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) != 0))); 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 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;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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_GC_UnTrack(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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_SeriesBinGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p;
  PyObject *o;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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 = Py_None; Py_INCREF(Py_None);
  p->f = Py_None; Py_INCREF(Py_None);
  p->bins = 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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->arr);
  Py_CLEAR(p->index);
  Py_CLEAR(p->dummy);
  Py_CLEAR(p->f);
  Py_CLEAR(p->bins);
  (*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) {
    e = (*v)(p->dummy, 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;
  }
  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);
  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->bins);
  p->bins = 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(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5dummy_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5dummy_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5dummy_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 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", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy, 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},
  {0, 0, 0, 0, 0}
};

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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_cache_readonly(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_cache_readonly *p;
  PyObject *o;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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;
  PyObject_GC_UnTrack(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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*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*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_SeriesIndex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_3lib_SeriesIndex *p;
  PyObject *o;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pandas_3lib_SeriesIndex *)o);
  p->_check_type = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_SeriesIndex(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesIndex *p = (struct __pyx_obj_6pandas_3lib_SeriesIndex *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_check_type);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_3lib_SeriesIndex(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_3lib_SeriesIndex *p = (struct __pyx_obj_6pandas_3lib_SeriesIndex *)o;
  if (p->_check_type) {
    e = (*v)(p->_check_type, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_3lib_SeriesIndex(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesIndex *p = (struct __pyx_obj_6pandas_3lib_SeriesIndex *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->_check_type);
  p->_check_type = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_descr_get_6pandas_3lib_SeriesIndex(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_3lib_11SeriesIndex_3__get__(o, i, c);
  return r;
}

static int __pyx_tp_descr_set_6pandas_3lib_SeriesIndex(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pandas_3lib_11SeriesIndex_5__set__(o, i, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__delete__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_3lib_SeriesIndex[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_3lib_SeriesIndex = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.SeriesIndex"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_SeriesIndex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_SeriesIndex, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_3lib_SeriesIndex, /*tp_traverse*/
  __pyx_tp_clear_6pandas_3lib_SeriesIndex, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_3lib_SeriesIndex, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_3lib_SeriesIndex, /*tp_descr_get*/
  __pyx_tp_descr_set_6pandas_3lib_SeriesIndex, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_3lib_11SeriesIndex_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_SeriesIndex, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_3lib_ValuesProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_ValuesProperty(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_descr_get_6pandas_3lib_ValuesProperty(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_3lib_14ValuesProperty_1__get__(o, i, c);
  return r;
}

static PyMethodDef __pyx_methods_6pandas_3lib_ValuesProperty[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6pandas_3lib_ValuesProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.lib.ValuesProperty"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_3lib_ValuesProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_3lib_ValuesProperty, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_ValuesProperty, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_3lib_ValuesProperty, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_3lib_ValuesProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_3lib_AxisProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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 struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[8];
static int __pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0;

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;
  if (likely((__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time)))) {
    o = (PyObject*)__pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[--__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!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;
  PyObject_GC_UnTrack(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);
  if ((__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time))) {
    __pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time++] = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o);
  } else {
    (*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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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 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;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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 = Py_None; Py_INCREF(Py_None);
  p->f = Py_None; Py_INCREF(Py_None);
  p->labels = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_3lib_SeriesGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->arr);
  Py_CLEAR(p->index);
  Py_CLEAR(p->dummy);
  Py_CLEAR(p->f);
  Py_CLEAR(p->labels);
  (*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) {
    e = (*v)(p->dummy, a); if (e) return e;
  }
  if (p->f) {
    e = (*v)(p->f, a); if (e) return e;
  }
  if (p->labels) {
    e = (*v)(p->labels, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_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);
  p->dummy = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->f);
  p->f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->labels);
  p->labels = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_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(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_3lib_13SeriesGrouper_5dummy_1__get__(o);
}

static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_5dummy_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_3lib_13SeriesGrouper_5dummy_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 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", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy, 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},
  {0, 0, 0, 0, 0}
};

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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[8];
static int __pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0;

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;
  if (likely((__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates)))) {
    o = (PyObject*)__pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[--__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates];
    memset(o, 0, sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o);
  p->__pyx_v_datetime = 0;
  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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_datetime);
  Py_CLEAR(p->__pyx_v_dayfirst);
  Py_CLEAR(p->__pyx_v_default);
  Py_CLEAR(p->__pyx_v_parse);
  if ((__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates))) {
    __pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates++] = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o);
  } else {
    (*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_datetime) {
    e = (*v)(p->__pyx_v_datetime, 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;
  }
  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_datetime);
  p->__pyx_v_datetime = 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);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_3lib___pyx_scope_struct__try_parse_dates[] = {
  {0, 0, 0, 0}
};

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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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__PandasNull(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*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*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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);
  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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->arr);
  Py_CLEAR(p->dummy);
  Py_CLEAR(p->f);
  Py_CLEAR(p->labels);
  (*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;
  }
  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);
  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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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 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;
  o = (*t->tp_alloc)(t, 0);
  if (unlikely(!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;
  PyObject_GC_UnTrack(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 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*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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 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)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    __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_n_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 1},
  {&__pyx_kp_u_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 1, 0, 0},
  {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0},
  {&__pyx_kp_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_n_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 1},
  {&__pyx_n_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 1},
  {&__pyx_n_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 1},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_n_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 1},
  {&__pyx_n_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 1},
  {&__pyx_n_s_170, __pyx_k_170, sizeof(__pyx_k_170), 0, 0, 1, 1},
  {&__pyx_n_s_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 0, 1, 1},
  {&__pyx_n_s_192, __pyx_k_192, sizeof(__pyx_k_192), 0, 0, 1, 1},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_211, __pyx_k_211, sizeof(__pyx_k_211), 0, 0, 1, 0},
  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
  {&__pyx_n_s_242, __pyx_k_242, sizeof(__pyx_k_242), 0, 0, 1, 1},
  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
  {&__pyx_n_s_255, __pyx_k_255, sizeof(__pyx_k_255), 0, 0, 1, 1},
  {&__pyx_n_s_264, __pyx_k_264, sizeof(__pyx_k_264), 0, 0, 1, 1},
  {&__pyx_n_s_267, __pyx_k_267, sizeof(__pyx_k_267), 0, 0, 1, 1},
  {&__pyx_n_s_270, __pyx_k_270, sizeof(__pyx_k_270), 0, 0, 1, 1},
  {&__pyx_n_s_283, __pyx_k_283, sizeof(__pyx_k_283), 0, 0, 1, 1},
  {&__pyx_n_s_286, __pyx_k_286, sizeof(__pyx_k_286), 0, 0, 1, 1},
  {&__pyx_n_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 1},
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
  {&__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_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
  {&__pyx_n_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 1},
  {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0},
  {&__pyx_n_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 1},
  {&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1},
  {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
  {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
  {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1},
  {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
  {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
  {&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0},
  {&__pyx_n_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 1},
  {&__pyx_n_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 1},
  {&__pyx_n_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 1},
  {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
  {&__pyx_n_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 1},
  {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
  {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
  {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0},
  {&__pyx_n_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 1},
  {&__pyx_n_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 1},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_n_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 1},
  {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
  {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0},
  {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0},
  {&__pyx_kp_u_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 1, 0, 0},
  {&__pyx_kp_u_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 1, 0, 0},
  {&__pyx_kp_u_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 1, 0, 0},
  {&__pyx_kp_u_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 1, 0, 0},
  {&__pyx_kp_u_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 1, 0, 0},
  {&__pyx_n_s__AssertionError, __pyx_k__AssertionError, sizeof(__pyx_k__AssertionError), 0, 0, 1, 1},
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
  {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
  {&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1},
  {&__pyx_n_s__FALSE, __pyx_k__FALSE, sizeof(__pyx_k__FALSE), 0, 0, 1, 1},
  {&__pyx_n_s__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__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____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1},
  {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 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____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1},
  {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1},
  {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1},
  {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1},
  {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 0, 0, 1, 1},
  {&__pyx_n_s____pyx_vtable__, __pyx_k____pyx_vtable__, sizeof(__pyx_k____pyx_vtable__), 0, 0, 1, 1},
  {&__pyx_n_s____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 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___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___ensure_index, __pyx_k___ensure_index, sizeof(__pyx_k___ensure_index), 0, 0, 1, 1},
  {&__pyx_n_s___get_result_array, __pyx_k___get_result_array, sizeof(__pyx_k___get_result_array), 0, 0, 1, 1},
  {&__pyx_n_s___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___make_time_series, __pyx_k___make_time_series, sizeof(__pyx_k___make_time_series), 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__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__b, __pyx_k__b, sizeof(__pyx_k__b), 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_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__create_hdf_rows_2d, __pyx_k__create_hdf_rows_2d, sizeof(__pyx_k__create_hdf_rows_2d), 0, 0, 1, 1},
  {&__pyx_n_s__create_hdf_rows_3d, __pyx_k__create_hdf_rows_3d, sizeof(__pyx_k__create_hdf_rows_3d), 0, 0, 1, 1},
  {&__pyx_n_s__create_hdf_rows_4d, __pyx_k__create_hdf_rows_4d, sizeof(__pyx_k__create_hdf_rows_4d), 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__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__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__indexer0, __pyx_k__indexer0, sizeof(__pyx_k__indexer0), 0, 0, 1, 1},
  {&__pyx_n_s__indexer1, __pyx_k__indexer1, sizeof(__pyx_k__indexer1), 0, 0, 1, 1},
  {&__pyx_n_s__indexer2, __pyx_k__indexer2, sizeof(__pyx_k__indexer2), 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_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, __pyx_k__is_timedelta, sizeof(__pyx_k__is_timedelta), 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__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__n_blocks, __pyx_k__n_blocks, sizeof(__pyx_k__n_blocks), 0, 0, 1, 1},
  {&__pyx_n_s__n_indexer0, __pyx_k__n_indexer0, sizeof(__pyx_k__n_indexer0), 0, 0, 1, 1},
  {&__pyx_n_s__n_indexer1, __pyx_k__n_indexer1, sizeof(__pyx_k__n_indexer1), 0, 0, 1, 1},
  {&__pyx_n_s__n_indexer2, __pyx_k__n_indexer2, sizeof(__pyx_k__n_indexer2), 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__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__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__searchable, __pyx_k__searchable, sizeof(__pyx_k__searchable), 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__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__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__tup_size, __pyx_k__tup_size, sizeof(__pyx_k__tup_size), 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__tz, __pyx_k__tz, sizeof(__pyx_k__tz), 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_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__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_GetBuiltinName(__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_GetBuiltinName(__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_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s__AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__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_GetBuiltinName(__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_Pack(1, ((PyObject *)__pyx_n_s__i8)); 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_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_Pack(1, ((PyObject *)__pyx_kp_s_2)); 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_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_Pack(1, __pyx_int_neg_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_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_Pack(2, __pyx_int_0, __pyx_int_0); 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_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_Pack(1, ((PyObject *)__pyx_kp_s_6)); 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_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_Pack(1, ((PyObject *)__pyx_kp_s_6)); 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_GIVEREF(((PyObject *)__pyx_k_tuple_9));

  /* "pandas/lib.pyx":1057
 * 
 *     if lenidx <= 0 or lenbin <= 0:
 *         raise ValueError("Invalid length for values or for binner")             # <<<<<<<<<<<<<<
 * 
 *     # check binner fits data
 */
  __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_12);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));

  /* "pandas/lib.pyx":1061
 *     # 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_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_14);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "pandas/lib.pyx":1064
 * 
 *     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_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_16);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));

  /* "pandas/lib.pyx":1234
 *         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_18 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "pandas/src/reduce.pyx":21
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:
 *                 arr = arr.copy('F')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = k
 */
  __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__F)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));

  /* "pandas/src/reduce.pyx":28
 *         else:
 *             if not arr.flags.c_contiguous:
 *                 arr = arr.copy('C')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = n
 */
  __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "pandas/src/reduce.pyx":45
 *         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_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "pandas/src/reduce.pyx":107
 *             result[0] = res
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_26);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));

  /* "pandas/src/reduce.pyx":128
 *         self.f = f
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = series
 *         self.index = series.index
 */
  __pyx_k_tuple_27 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_27);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));

  /* "pandas/src/reduce.pyx":143
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
  __pyx_k_tuple_28 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_28);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));

  /* "pandas/src/reduce.pyx":146
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()
 */
  __pyx_k_tuple_29 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));

  /* "pandas/src/reduce.pyx":219
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_30 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_30);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));

  /* "pandas/src/reduce.pyx":242
 *         self.f = f
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = series
 *         self.index = series.index
 */
  __pyx_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "pandas/src/reduce.pyx":252
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
  __pyx_k_tuple_32 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_32);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));

  /* "pandas/src/reduce.pyx":255
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()
 */
  __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_33);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));

  /* "pandas/src/reduce.pyx":331
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_34);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));

  /* "pandas/src/reduce.pyx":393
 * 
 *     if frame.index._has_complex_internals:
 *         raise InvalidApply('Cannot modify frame index internals')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_37);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));

  /* "pandas/src/reduce.pyx":405
 *             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_39 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_39);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));

  /* "pandas/src/reduce.pyx":407
 *                 raise InvalidApply('Function unsafe for fast apply')
 *         except:
 *             raise InvalidApply('Let this error raise above us')             # <<<<<<<<<<<<<<
 * 
 *     slider = BlockSlider(frame)
 */
  __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_41);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));

  /* "pandas/src/reduce.pyx":454
 *     def __init__(self, frame):
 *         self.frame = frame
 *         self.dummy = frame[:0]             # <<<<<<<<<<<<<<
 * 
 *         self.blocks = [b.values for b in self.dummy._data.blocks]
 */
  __pyx_k_slice_42 = PySlice_New(Py_None, __pyx_int_0, Py_None); if (unlikely(!__pyx_k_slice_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_42);
  __Pyx_GIVEREF(__pyx_k_slice_42);

  /* "pandas/src/reduce.pyx":502
 * 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_44 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_43)); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_44);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));

  /* "pandas/src/properties.pyx":74
 *     def __set__(self, obj, value):
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')             # <<<<<<<<<<<<<<
 *         obj._index = val = self._check_type(value)
 *         if hasattr(val, 'tz'):
 */
  __pyx_k_tuple_49 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_48)); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_49);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));

  /* "pandas/src/inference.pyx":53
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     val = util.get_value_1d(values, 0)
 */
  __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__O)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_51);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));

  /* "pandas/src/inference.pyx":393
 *                 seen_float = 1
 *             else:
 *                 raise ValueError('Empty string encountered')             # <<<<<<<<<<<<<<
 *         elif util.is_complex_object(val):
 *             complexes[i] = val
 */
  __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_58)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_59);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));

  /* "pandas/src/inference.pyx":595
 *             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_67 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_67);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
  __pyx_k_codeobj_68 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__parse_date, 595, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_68)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":636
 *     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_75 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_74)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_75);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));

  /* "pandas/src/inference.pyx":648
 *             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_77 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_77);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));
  __pyx_k_codeobj_78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__parse_date, 648, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_78)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":661
 *             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_80 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
  __pyx_k_codeobj_81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__parse_time, 661, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_81)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":689
 *     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_84 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_83)); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_84);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));

  /* "pandas/src/inference.pyx":715
 *     if (len(months) != n and len(days) != n and len(hours) != n and
 *         len(minutes) != n and len(seconds) != n):
 *         raise ValueError('Length of all datetime components must be equal')             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_k_tuple_86 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_85)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_86);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));

  /* "pandas/src/inference.pyx":959
 *     if n == 0:
 *         # kludge, for Series
 *         return np.empty(0, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_89 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_89);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));

  /* "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_92 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_91)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_92);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));

  /* "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_94 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_93)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_94);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));

  /* "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_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_95)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_96);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));

  /* "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_99 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_98)); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_99);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));

  /* "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_100 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_95)); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_100);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));

  /* "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_102 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_101)); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_102);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));

  /* "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_104 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_103)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_104);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));

  /* "util.pxd":57
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
  __pyx_k_tuple_105 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_103)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_105);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));

  /* "pandas/lib.pyx":85
 * from libc.stdlib cimport malloc, free
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */
  __pyx_k_tuple_106 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_106);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
  __pyx_k_codeobj_107 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__ismember, 85, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_107)) {__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_109 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_109);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
  __pyx_k_codeobj_110 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__array_to_timestamp, 140, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_110)) {__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_111 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_111);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
  __pyx_k_codeobj_112 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__time64_to_datetime, 152, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_112)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":202
 *         return util._checknull(val)
 * 
 * def isscalar(object val):             # <<<<<<<<<<<<<<
 *     return np.isscalar(val) or val is None or PyDateTime_Check(val)
 * 
 */
  __pyx_k_tuple_113 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
  __pyx_k_codeobj_114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__isscalar, 202, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_114)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":208
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_k_tuple_115 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_115);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));
  __pyx_k_codeobj_116 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__isnullobj, 208, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_116)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __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_117 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_117);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
  __pyx_k_codeobj_118 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__isnullobj_old, 221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_118)) {__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_119 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_119);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_119));
  __pyx_k_codeobj_120 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__isnullobj2d, 235, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_120)) {__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_121 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_121);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_121));
  __pyx_k_codeobj_122 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__isnullobj_old, 251, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_122)) {__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_123 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_123);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));
  __pyx_k_codeobj_124 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__isnullobj2d_old, 265, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_124)) {__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_125 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__obj), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_125);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
  __pyx_k_codeobj_126 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_50, 279, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_126)) {__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_127 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_127);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
  __pyx_k_codeobj_128 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__fast_unique, 299, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_128)) {__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_129 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arrays), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_129);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));
  __pyx_k_codeobj_130 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_131, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_130)) {__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_132 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__lists), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_132);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));
  __pyx_k_codeobj_133 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_134, 346, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_133)) {__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_135 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__gen), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_135);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
  __pyx_k_codeobj_136 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_137, 372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_136)) {__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_138 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__dicts), ((PyObject *)__pyx_n_s__columns), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__row), ((PyObject *)__pyx_n_s__col), ((PyObject *)__pyx_n_s__onan)); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_138);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138));
  __pyx_k_codeobj_139 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__dicts_to_array, 397, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_139)) {__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_140 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__ndarrays), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__it), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_140);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140));
  __pyx_k_codeobj_141 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__fast_zip, 420, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_141)) {__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_142 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__rev_indexer), ((PyObject *)__pyx_n_s__idx)); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_142);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142));
  __pyx_k_codeobj_143 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__get_reverse_indexer, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_143)) {__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_144 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_s__neginf), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_144)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_144);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_144));
  __pyx_k_codeobj_145 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__has_infs_f4, 477, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_145)) {__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_146 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_s__neginf), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_146)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_146);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_146));
  __pyx_k_codeobj_147 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__has_infs_f8, 491, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_147)) {__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_148 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__cache), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_148)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_148);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_148));
  __pyx_k_codeobj_149 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__convert_timestamps, 505, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_149)) {__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_150 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__indices), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_150)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_150);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_150));
  __pyx_k_codeobj_151 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_152, 528, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_151)) {__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_153 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__started), ((PyObject *)__pyx_n_s__finished)); if (unlikely(!__pyx_k_tuple_153)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_153);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_153));
  __pyx_k_codeobj_154 = (PyObject*)__Pyx_PyCode_New(1, 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_108, __pyx_n_s_155, 541, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_154)) {__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_156 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_156)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_156);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_156));
  __pyx_k_codeobj_157 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__scalar_compare, 572, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_157)) {__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_158 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_158)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_158);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_158));
  __pyx_k_codeobj_159 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__vec_compare, 616, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_159)) {__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_160 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_160);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_160));
  __pyx_k_codeobj_161 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__scalar_binop, 668, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_161)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":687
 * @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_162 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_162)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_162);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_162));
  __pyx_k_codeobj_163 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__vec_binop, 687, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_163)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":714
 * 
 * 
 * def astype_intsafe(ndarray[object] arr, new_dtype):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_164 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__new_dtype), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_164)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_164);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_164));
  __pyx_k_codeobj_165 = (PyObject*)__Pyx_PyCode_New(2, 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_108, __pyx_n_s__astype_intsafe, 714, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_165)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":725
 *     return result
 * 
 * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Utility used in pandas.core.index._ensure_index
 */
  __pyx_k_tuple_166 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__obj), ((PyObject *)__pyx_n_s__converted), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__all_arrays)); if (unlikely(!__pyx_k_tuple_166)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_166);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_166));
  __pyx_k_codeobj_167 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__clean_index_list, 725, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_167)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":756
 * @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_168 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_168)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_168);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_168));
  __pyx_k_codeobj_169 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_170, 756, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_169)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":776
 * @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_171 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__nan_rep), ((PyObject *)__pyx_n_s__replace), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i)); if (unlikely(!__pyx_k_tuple_171)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_171);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_171));
  __pyx_k_codeobj_172 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_173, 776, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_172)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":791
 * @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_174 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__data_index), ((PyObject *)__pyx_n_s__nlevels), ((PyObject *)__pyx_n_s__cols), ((PyObject *)__pyx_n_s__writer), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__ncols), ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__row), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_174);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));
  __pyx_k_codeobj_175 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__write_csv_rows, 791, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_175)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":838
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_2d(ndarray indexer0,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=1] mask,
 */
  __pyx_k_tuple_176 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__indexer0), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__searchable), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__n_indexer0), ((PyObject *)__pyx_n_s__n_blocks), ((PyObject *)__pyx_n_s__tup_size), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_176)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_176);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176));
  __pyx_k_codeobj_177 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__create_hdf_rows_2d, 838, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_177)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":883
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_3d(ndarray indexer0, ndarray indexer1,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=2] mask,
 */
  __pyx_k_tuple_178 = PyTuple_Pack(17, ((PyObject *)__pyx_n_s__indexer0), ((PyObject *)__pyx_n_s__indexer1), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__searchable), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__n_indexer0), ((PyObject *)__pyx_n_s__n_indexer1), ((PyObject *)__pyx_n_s__n_blocks), ((PyObject *)__pyx_n_s__tup_size), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_178);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
  __pyx_k_codeobj_179 = (PyObject*)__Pyx_PyCode_New(6, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__create_hdf_rows_3d, 883, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_179)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":933
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_4d(ndarray indexer0, ndarray indexer1, ndarray indexer2,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=3] mask,
 */
  __pyx_k_tuple_180 = PyTuple_Pack(20, ((PyObject *)__pyx_n_s__indexer0), ((PyObject *)__pyx_n_s__indexer1), ((PyObject *)__pyx_n_s__indexer2), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__searchable), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__n_indexer0), ((PyObject *)__pyx_n_s__n_indexer1), ((PyObject *)__pyx_n_s__n_indexer2), ((PyObject *)__pyx_n_s__n_blocks), ((PyObject *)__pyx_n_s__tup_size), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_180)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_180);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180));
  __pyx_k_codeobj_181 = (PyObject*)__Pyx_PyCode_New(7, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__create_hdf_rows_4d, 933, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_181)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":990
 * 
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef int length = index.shape[0]
 *     cdef int i = 0
 */
  __pyx_k_tuple_182 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_182)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_182);
  __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_108, __pyx_n_s__arrmap, 990, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_183)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1003
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */
  __pyx_k_tuple_184 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__list_of_arrays), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__nlevels), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__pre), ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__vecs)); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_184);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
  __pyx_k_codeobj_185 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__is_lexsorted, 1003, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_185)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1042
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,             # <<<<<<<<<<<<<<
 *                        object closed='left'):
 *     """
 */
  __pyx_k_tuple_186 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__binner), ((PyObject *)__pyx_n_s__closed), ((PyObject *)__pyx_n_s__lenidx), ((PyObject *)__pyx_n_s__lenbin), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__bc), ((PyObject *)__pyx_n_s__vc), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__l_bin), ((PyObject *)__pyx_n_s__r_bin), ((PyObject *)__pyx_n_s__right_closed)); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_186);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
  __pyx_k_codeobj_187 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__generate_bins_dt64, 1042, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_187)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1091
 * @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_188 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__out)); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_188);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
  __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__row_bool_subset, 1091, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1112
 * @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_190 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__out)); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_190);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s_192, 1112, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1132
 * 
 * 
 * def group_count(ndarray[int64_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_193 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__size), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts)); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_193);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193));
  __pyx_k_codeobj_194 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__group_count, 1132, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_194)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1142
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_195 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mapping), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_195);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195));
  __pyx_k_codeobj_196 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__lookup_values, 1142, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_196)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1152
 * 
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_k_tuple_197 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__max_bin), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts)); if (unlikely(!__pyx_k_tuple_197)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_197);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_197));
  __pyx_k_codeobj_198 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__count_level_1d, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_198)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1169
 * 
 * 
 * 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_199 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__max_bin), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts)); if (unlikely(!__pyx_k_tuple_199)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_199);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_199));
  __pyx_k_codeobj_200 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__count_level_2d, 1169, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_200)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1200
 * 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_201 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__ndarrays), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__it), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_201)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_201);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_201));
  __pyx_k_codeobj_202 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__fast_zip_fillna, 1200, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_202)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1247
 *     return result
 * 
 * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_203 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__take_last), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__seen), ((PyObject *)__pyx_n_s__row), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_203)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_203);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_203));
  __pyx_k_codeobj_204 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__duplicated, 1247, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_204)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1276
 *     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_205 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__group_size), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__slobj), ((PyObject *)__pyx_n_s__starts), ((PyObject *)__pyx_n_s__ends)); if (unlikely(!__pyx_k_tuple_205)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_205);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_205));
  __pyx_k_codeobj_206 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__generate_slices, 1276, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_206)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/lib.pyx":1301
 * 
 * 
 * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
 *                  list sorted_labels):
 *     cdef:
 */
  __pyx_k_tuple_207 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__keys), ((PyObject *)__pyx_n_s__sorted_labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_207)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_207);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_207));
  __pyx_k_codeobj_208 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_108, __pyx_n_s__indices_fast, 1301, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_208)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/reduce.pyx":383
 *     pass
 * 
 * def apply_frame_axis0(object frame, object f, object names,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] starts, ndarray[int64_t] ends):
 *     cdef:
 */
  __pyx_k_tuple_209 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__frame), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__names), ((PyObject *)__pyx_n_s__starts), ((PyObject *)__pyx_n_s__ends), ((PyObject *)__pyx_n_s__slider), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__results), ((PyObject *)__pyx_n_s__piece), ((PyObject *)__pyx_n_s__item_cache), ((PyObject *)__pyx_n_s__chunk), ((PyObject *)__pyx_n_s__shape_before), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__mutated), ((PyObject *)__pyx_n_s__gin)); if (unlikely(!__pyx_k_tuple_209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_209);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_209));
  __pyx_k_codeobj_210 = (PyObject*)__Pyx_PyCode_New(5, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_211, __pyx_n_s__apply_frame_axis0, 383, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_210)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/reduce.pyx":500
 * 
 * 
 * def reduce(arr, f, axis=0, dummy=None, labels=None):             # <<<<<<<<<<<<<<
 *     if labels._has_complex_internals:
 *         raise Exception('Cannot use shortcut')
 */
  __pyx_k_tuple_212 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__dummy), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__reducer)); if (unlikely(!__pyx_k_tuple_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_212);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_212));
  __pyx_k_codeobj_213 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_211, __pyx_n_s__reduce, 500, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":31
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_214 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s___values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val_kind)); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_214);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214));
  __pyx_k_codeobj_215 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__infer_dtype, 31, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_215)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":111
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_216 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_216);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216));
  __pyx_k_codeobj_217 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__infer_dtype_list, 111, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_217)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":126
 *     return PyTime_Check(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_218 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_218)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_218);
  __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_69, __pyx_n_s__is_bool_array, 126, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_219)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":147
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_k_tuple_220 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_220);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220));
  __pyx_k_codeobj_221 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_integer, 147, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_221)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":150
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_222 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_222)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_222);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_222));
  __pyx_k_codeobj_223 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_integer_array, 150, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_223)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":171
 *         return False
 * 
 * def is_integer_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_224 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_224)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_224);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_224));
  __pyx_k_codeobj_225 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_52, 171, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_225)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":194
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_226 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_226)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_226);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_226));
  __pyx_k_codeobj_227 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_float_array, 194, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_227)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":215
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_228 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_228)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_228);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_228));
  __pyx_k_codeobj_229 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_string_array, 215, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_229)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":236
 *         return False
 * 
 * def is_unicode_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_230 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_230)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_230);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_230));
  __pyx_k_codeobj_231 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_unicode_array, 236, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_231)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":258
 * 
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_232 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_232);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232));
  __pyx_k_codeobj_233 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_datetime_array, 258, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_233)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":268
 * 
 * 
 * def is_datetime64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_234 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_234)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_234);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_234));
  __pyx_k_codeobj_235 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_datetime64_array, 268, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_235)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":277
 *     return True
 * 
 * def is_timedelta(object o):             # <<<<<<<<<<<<<<
 *     import datetime
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 */
  __pyx_k_tuple_236 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__o), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_236)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_236);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_236));
  __pyx_k_codeobj_237 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_timedelta, 277, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_237)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":281
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 * 
 * def is_timedelta_array(ndarray values):             # <<<<<<<<<<<<<<
 *     import datetime
 *     cdef int i, n = len(values)
 */
  __pyx_k_tuple_238 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_238)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_238);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_238));
  __pyx_k_codeobj_239 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_timedelta_array, 281, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_239)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":291
 *     return True
 * 
 * def is_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_240 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_240)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_240);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_240));
  __pyx_k_codeobj_241 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_242, 291, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_241)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":300
 *     return True
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     import datetime
 *     cdef int i, n = len(values)
 */
  __pyx_k_tuple_243 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_243)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_243);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_243));
  __pyx_k_codeobj_244 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_55, 300, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_244)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":310
 *     return True
 * 
 * def is_date_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_245 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_245)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_245);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_245));
  __pyx_k_codeobj_246 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_date_array, 310, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_246)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":319
 *     return True
 * 
 * def is_time_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_247 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_247)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_247);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_247));
  __pyx_k_codeobj_248 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_time_array, 319, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_248)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":328
 *     return True
 * 
 * def is_period(object o):             # <<<<<<<<<<<<<<
 *     from pandas import Period
 *     return isinstance(o,Period)
 */
  __pyx_k_tuple_249 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__o), ((PyObject *)__pyx_n_s__Period)); if (unlikely(!__pyx_k_tuple_249)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_249);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_249));
  __pyx_k_codeobj_250 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_period, 328, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_250)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":332
 *     return isinstance(o,Period)
 * 
 * def is_period_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     from pandas import Period
 */
  __pyx_k_tuple_251 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__Period)); if (unlikely(!__pyx_k_tuple_251)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_251);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_251));
  __pyx_k_codeobj_252 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__is_period_array, 332, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_252)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":350
 * 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_253 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__na_values), ((PyObject *)__pyx_n_s__convert_empty), ((PyObject *)__pyx_n_s__coerce_numeric), ((PyObject *)__pyx_n_s__status), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__floats), ((PyObject *)__pyx_n_s__complexes), ((PyObject *)__pyx_n_s__ints), ((PyObject *)__pyx_n_s__seen_float), ((PyObject *)__pyx_n_s__seen_complex), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__fval), ((PyObject *)__pyx_n_s__seen_int)); if (unlikely(!__pyx_k_tuple_253)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_253);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_253));
  __pyx_k_codeobj_254 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_255, 350, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_254)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":428
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0, bint convert_datetime=0):
 *     '''
 */
  __pyx_k_tuple_256 = PyTuple_Pack(24, ((PyObject *)__pyx_n_s__objects), ((PyObject *)__pyx_n_s__try_float), ((PyObject *)__pyx_n_s__safe), ((PyObject *)__pyx_n_s__convert_datetime), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__floats), ((PyObject *)__pyx_n_s__complexes), ((PyObject *)__pyx_n_s__ints), ((PyObject *)__pyx_n_s__bools), ((PyObject *)__pyx_n_s__idatetimes), ((PyObject *)__pyx_n_s__seen_float), ((PyObject *)__pyx_n_s__seen_complex), ((PyObject *)__pyx_n_s__seen_datetime), ((PyObject *)__pyx_n_s__seen_int), ((PyObject *)__pyx_n_s__seen_bool), ((PyObject *)__pyx_n_s__seen_object), ((PyObject *)__pyx_n_s__seen_null), ((PyObject *)__pyx_n_s__seen_numeric), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__onan), ((PyObject *)__pyx_n_s__fval), ((PyObject *)__pyx_n_s__fnan), ((PyObject *)__pyx_n_s__datetimes)); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_256);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256));
  __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(4, 0, 24, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_10, 428, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":572
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_k_tuple_258 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_258)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_258);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_258));
  __pyx_k_codeobj_259 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__convert_sql_column, 572, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_259)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":575
 *     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_260 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__parser), ((PyObject *)__pyx_n_s__dayfirst), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_n_s__timedelta), ((PyObject *)__pyx_n_s__date), ((PyObject *)__pyx_n_s__parse), ((PyObject *)__pyx_n_s__parse_date), ((PyObject *)__pyx_n_s__parse_date)); if (unlikely(!__pyx_k_tuple_260)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_260);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_260));
  __pyx_k_codeobj_261 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__try_parse_dates, 575, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_261)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":625
 *     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_262 = PyTuple_Pack(20, ((PyObject *)__pyx_n_s__dates), ((PyObject *)__pyx_n_s__times), ((PyObject *)__pyx_n_s__date_parser), ((PyObject *)__pyx_n_s__time_parser), ((PyObject *)__pyx_n_s__dayfirst), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__date), ((PyObject *)__pyx_n_s__time), ((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_n_s__timedelta), ((PyObject *)__pyx_n_s__parse), ((PyObject *)__pyx_n_s__parse_date), ((PyObject *)__pyx_n_s__parse_date), ((PyObject *)__pyx_n_s__parse_time), ((PyObject *)__pyx_n_s__parse_time), ((PyObject *)__pyx_n_s__d), ((PyObject *)__pyx_n_s__t)); if (unlikely(!__pyx_k_tuple_262)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_262);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_262));
  __pyx_k_codeobj_263 = (PyObject*)__Pyx_PyCode_New(6, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_264, 625, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_263)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":679
 * 
 * 
 * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months,             # <<<<<<<<<<<<<<
 *                              ndarray[object] days):
 *     cdef:
 */
  __pyx_k_tuple_265 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__years), ((PyObject *)__pyx_n_s__months), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_265);
  __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_69, __pyx_n_s_267, 679, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_266)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":697
 *     return result
 * 
 * def try_parse_datetime_components(ndarray[object] years,             # <<<<<<<<<<<<<<
 *                                   ndarray[object] months,
 *                                   ndarray[object] days,
 */
  __pyx_k_tuple_268 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__years), ((PyObject *)__pyx_n_s__months), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__hours), ((PyObject *)__pyx_n_s__minutes), ((PyObject *)__pyx_n_s__seconds), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__secs), ((PyObject *)__pyx_n_s__micros), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_268)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_268);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_268));
  __pyx_k_codeobj_269 = (PyObject*)__Pyx_PyCode_New(6, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_270, 697, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_269)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":731
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                      convert_empty=True):
 *     cdef:
 */
  __pyx_k_tuple_271 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__na_values), ((PyObject *)__pyx_n_s__convert_empty), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__onan), ((PyObject *)__pyx_n_s__na_count), ((PyObject *)__pyx_n_s__memo)); if (unlikely(!__pyx_k_tuple_271)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_271);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_271));
  __pyx_k_codeobj_272 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__sanitize_objects, 731, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_272)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":754
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr,             # <<<<<<<<<<<<<<
 *                        true_values=None, false_values=None):
 *     cdef:
 */
  __pyx_k_tuple_273 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__true_values), ((PyObject *)__pyx_n_s__false_values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__true_vals), ((PyObject *)__pyx_n_s__false_vals), ((PyObject *)__pyx_n_s__na_count), ((PyObject *)__pyx_n_s__mask)); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_273);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273));
  __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__maybe_convert_bool, 754, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":803
 * 
 * 
 * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask,             # <<<<<<<<<<<<<<
 *                    bint convert=1):
 *     '''
 */
  __pyx_k_tuple_275 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__convert), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_275)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_275);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_275));
  __pyx_k_codeobj_276 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__map_infer_mask, 803, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_276)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":843
 *     return result
 * 
 * def map_infer(ndarray arr, object f, bint convert=1):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_k_tuple_277 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__convert), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_277)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_277);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_277));
  __pyx_k_codeobj_278 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__map_infer, 843, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_278)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":880
 * 
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_279 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__tmp), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__row)); if (unlikely(!__pyx_k_tuple_279)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_279);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_279));
  __pyx_k_codeobj_280 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__to_object_array, 880, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_280)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":904
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_281 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__tuples), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__tmp), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__tup)); if (unlikely(!__pyx_k_tuple_281)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_281);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_281));
  __pyx_k_codeobj_282 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_283, 904, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_282)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":920
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_284 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__tmp), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__row)); if (unlikely(!__pyx_k_tuple_284)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_284);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_284));
  __pyx_k_codeobj_285 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s_286, 920, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_285)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/inference.pyx":951
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_k_tuple_287 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__mapping), ((PyObject *)__pyx_n_s__keys), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_287)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_287);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_287));
  __pyx_k_codeobj_288 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_69, __pyx_n_s__fast_multiget, 951, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_288)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  #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 PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  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 ---*/
  __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 = 438; __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 = 438; __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 = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_BlockSlider = &__pyx_type_6pandas_3lib_BlockSlider;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_SeriesBinGrouper = &__pyx_type_6pandas_3lib_SeriesBinGrouper;
  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_SeriesIndex) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "SeriesIndex", (PyObject *)&__pyx_type_6pandas_3lib_SeriesIndex) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_SeriesIndex = &__pyx_type_6pandas_3lib_SeriesIndex;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_ValuesProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ValuesProperty", (PyObject *)&__pyx_type_6pandas_3lib_ValuesProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_ValuesProperty = &__pyx_type_6pandas_3lib_ValuesProperty;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __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 = 47; __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_1_try_parse_date_and_time) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __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;
  if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_SeriesGrouper = &__pyx_type_6pandas_3lib_SeriesGrouper;
  if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __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__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1185; __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 = 1185; __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 = 5; __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 = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_Reducer = &__pyx_type_6pandas_3lib_Reducer;
  __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 = 335; __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 = 335; __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 = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_3lib_Slider = &__pyx_type_6pandas_3lib_Slider;
  /*--- 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;}
  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 (PyDict_SetItem(__pyx_d, __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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 (PyDict_SetItem(__pyx_d, __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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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 = __Pyx_ImportFrom(__pyx_t_3, __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 (PyDict_SetItem(__pyx_d, __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
 * 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 (PyDict_SetItem(__pyx_d, __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
 * 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 = __Pyx_ImportFrom(__pyx_t_2, __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 (PyDict_SetItem(__pyx_d, __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 = __Pyx_ImportFrom(__pyx_t_2, __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 (PyDict_SetItem(__pyx_d, __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 = __Pyx_ImportFrom(__pyx_t_2, __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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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 = __Pyx_ImportFrom(__pyx_t_3, __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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__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             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_6pandas_3lib_NEGINF = (-__pyx_v_6pandas_3lib_INF);

  /* "pandas/lib.pyx":202
 *         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_66); 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);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__isscalar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":208
 * @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_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnullobj, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_50, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_131, __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_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_134, __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_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_137, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_152, __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_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_155, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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_66); 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 (PyDict_SetItem(__pyx_d, __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":687
 * @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_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__vec_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":714
 * 
 * 
 * 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_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__astype_intsafe, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":725
 *     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_65clean_index_list, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__clean_index_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":756
 * @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_67max_len_string_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_170, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":776
 * @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_69string_array_replace_from_nan_rep, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_173, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":791
 * @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_71write_csv_rows, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__write_csv_rows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":838
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_2d(ndarray indexer0,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=1] mask,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_73create_hdf_rows_2d, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__create_hdf_rows_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":883
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_3d(ndarray indexer0, ndarray indexer1,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=2] mask,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_75create_hdf_rows_3d, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__create_hdf_rows_3d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":933
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def create_hdf_rows_4d(ndarray indexer0, ndarray indexer1, ndarray indexer2,             # <<<<<<<<<<<<<<
 *                        object dtype,
 *                        ndarray[np.uint8_t, ndim=3] mask,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_77create_hdf_rows_4d, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__create_hdf_rows_4d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":990
 * 
 * @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_79arrmap, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1003
 * @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_81is_lexsorted, NULL, __pyx_n_s_66); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s__is_lexsorted, __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":1042
 * @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_83generate_bins_dt64, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__generate_bins_dt64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1091
 * @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_85row_bool_subset, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__row_bool_subset, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1112
 * @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_87row_bool_subset_object, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_192, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1132
 * 
 * 
 * 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_89group_count, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1142
 *     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_91lookup_values, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__lookup_values, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1152
 * 
 * 
 * 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_93count_level_1d, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__count_level_1d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1169
 * 
 * 
 * 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_95count_level_2d, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__count_level_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1198
 *         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 = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__pandas_null, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1200
 * 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_GetModuleGlobalName(__pyx_n_s__pandas_null); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_17 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_97fast_zip_fillna, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__fast_zip_fillna, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1247
 *     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 = 1247; __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_99duplicated, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__duplicated, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1276
 *     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_101generate_slices, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__generate_slices, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/lib.pyx":1301
 * 
 * 
 * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
 *                  list sorted_labels):
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_103indices_fast, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__indices_fast, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":2
 * from numpy cimport *
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":380
 * 
 * 
 * class InvalidApply(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_5 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2), __pyx_n_s__InvalidApply, __pyx_n_s__InvalidApply, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__InvalidApply, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":383
 *     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_105apply_frame_axis0, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__apply_frame_axis0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/reduce.pyx":500
 * 
 * 
 * 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_107reduce, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__reduce, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __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_45 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":3
 * cimport util
 * 
 * _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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "pandas/src/inference.pyx":4
 * 
 * _TYPE_MAP = {
 *     np.int8: 'integer',             # <<<<<<<<<<<<<<
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":5
 * _TYPE_MAP = {
 *     np.int8: 'integer',
 *     np.int16: 'integer',             # <<<<<<<<<<<<<<
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":6
 *     np.int8: 'integer',
 *     np.int16: 'integer',
 *     np.int32: 'integer',             # <<<<<<<<<<<<<<
 *     np.int64: 'integer',
 *     np.uint8: 'integer',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":7
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 *     np.int64: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); 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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":8
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 *     np.uint8: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); 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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":9
 *     np.int64: 'integer',
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint16); 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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":10
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint64: 'integer',
 *     np.float32: 'floating',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint32); 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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":11
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',             # <<<<<<<<<<<<<<
 *     np.float32: 'floating',
 *     np.float64: 'floating',
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint64); 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 = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":12
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',
 *     np.float32: 'floating',             # <<<<<<<<<<<<<<
 *     np.float64: 'floating',
 *     np.complex128: 'complex',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__float32); 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__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":13
 *     np.uint64: 'integer',
 *     np.float32: 'floating',
 *     np.float64: 'floating',             # <<<<<<<<<<<<<<
 *     np.complex128: 'complex',
 *     np.complex128: 'complex',
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float64); 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__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":14
 *     np.float32: 'floating',
 *     np.float64: 'floating',
 *     np.complex128: 'complex',             # <<<<<<<<<<<<<<
 *     np.complex128: 'complex',
 *     np.string_: 'string',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__complex128); 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__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":15
 *     np.float64: 'floating',
 *     np.complex128: 'complex',
 *     np.complex128: 'complex',             # <<<<<<<<<<<<<<
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__complex128); 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__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":16
 *     np.complex128: 'complex',
 *     np.complex128: 'complex',
 *     np.string_: 'string',             # <<<<<<<<<<<<<<
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean',
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__string_); 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__string)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":17
 *     np.complex128: 'complex',
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',             # <<<<<<<<<<<<<<
 *     np.bool_: 'boolean',
 *     np.datetime64 : 'datetime64'
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__unicode_); 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__unicode)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":18
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean',             # <<<<<<<<<<<<<<
 *     np.datetime64 : 'datetime64'
 * }
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__bool_); 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__boolean)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/inference.pyx":19
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean',
 *     np.datetime64 : 'datetime64'             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__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 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__datetime64); 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__datetime64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s___TYPE_MAP, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/src/inference.pyx":22
 * }
 * 
 * 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":23
 * 
 * try:
 *     _TYPE_MAP[np.float128] = 'floating'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__float128); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __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 = 23; __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":24
 * try:
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__complex256); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_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 = 24; __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":25
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 *     _TYPE_MAP[np.timedelta64] = 'timedelta64'
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __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 = 25; __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;

      /* "pandas/src/inference.pyx":26
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.timedelta64] = 'timedelta64'
 * except AttributeError:
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __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__datetime64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __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":27
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 *     _TYPE_MAP[np.timedelta64] = 'timedelta64'             # <<<<<<<<<<<<<<
 * except AttributeError:
 *     pass
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); 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_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyObject_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_n_s__timedelta64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __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;
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/src/inference.pyx":28
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 *     _TYPE_MAP[np.timedelta64] = 'timedelta64'
 * 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":31
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_109infer_dtype, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__infer_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":111
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_111infer_dtype_list, NULL, __pyx_n_s_66); 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);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__infer_dtype_list, __pyx_t_5) < 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;

  /* "pandas/src/inference.pyx":126
 *     return PyTime_Check(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_113is_bool_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_bool_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":147
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_115is_integer, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_integer, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":150
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_117is_integer_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_integer_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":171
 *         return False
 * 
 * def is_integer_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_119is_integer_float_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_52, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":194
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_121is_float_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_float_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":215
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_123is_string_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_string_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":236
 *         return False
 * 
 * def is_unicode_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_125is_unicode_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_unicode_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":258
 * 
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_127is_datetime_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_datetime_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":268
 * 
 * 
 * def is_datetime64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_129is_datetime64_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_datetime64_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":277
 *     return True
 * 
 * def is_timedelta(object o):             # <<<<<<<<<<<<<<
 *     import datetime
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_131is_timedelta, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_timedelta, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":281
 *     return isinstance(o,datetime.timedelta) or isinstance(o,np.timedelta64)
 * 
 * def is_timedelta_array(ndarray values):             # <<<<<<<<<<<<<<
 *     import datetime
 *     cdef int i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_133is_timedelta_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_timedelta_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":291
 *     return True
 * 
 * def is_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_135is_timedelta64_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_242, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":300
 *     return True
 * 
 * def is_timedelta_or_timedelta64_array(ndarray values):             # <<<<<<<<<<<<<<
 *     import datetime
 *     cdef int i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_137is_timedelta_or_timedelta64_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_55, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":310
 *     return True
 * 
 * def is_date_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_139is_date_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_date_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":319
 *     return True
 * 
 * def is_time_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_141is_time_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_time_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":328
 *     return True
 * 
 * def is_period(object o):             # <<<<<<<<<<<<<<
 *     from pandas import Period
 *     return isinstance(o,Period)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_143is_period, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_period, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":332
 *     return isinstance(o,Period)
 * 
 * def is_period_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     from pandas import Period
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_145is_period_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_period_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":347
 *     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":348
 * 
 * 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":351
 * 
 * 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_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_56 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_57 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":350
 * 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_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_147maybe_convert_numeric, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_255, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":428
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0, bint convert_datetime=0):
 *     '''
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_149maybe_convert_objects, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_10, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":572
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_151convert_sql_column, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__convert_sql_column, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":576
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,
 *                     dayfirst=False,default=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_62 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":575
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None,             # <<<<<<<<<<<<<<
 *                     dayfirst=False,default=None):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_153try_parse_dates, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__try_parse_dates, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":627
 * 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_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_72 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":625
 *     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_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_155try_parse_date_and_time, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_264, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":679
 * 
 * 
 * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months,             # <<<<<<<<<<<<<<
 *                              ndarray[object] days):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_157try_parse_year_month_day, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_267, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":697
 *     return result
 * 
 * def try_parse_datetime_components(ndarray[object] years,             # <<<<<<<<<<<<<<
 *                                   ndarray[object] months,
 *                                   ndarray[object] days,
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_159try_parse_datetime_components, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_270, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":732
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,
 *                      convert_empty=True):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_87 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":731
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values,             # <<<<<<<<<<<<<<
 *                      convert_empty=True):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_161sanitize_objects, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__sanitize_objects, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":754
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr,             # <<<<<<<<<<<<<<
 *                        true_values=None, false_values=None):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_163maybe_convert_bool, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__maybe_convert_bool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":803
 * 
 * 
 * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask,             # <<<<<<<<<<<<<<
 *                    bint convert=1):
 *     '''
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_165map_infer_mask, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__map_infer_mask, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":843
 *     return result
 * 
 * def map_infer(ndarray arr, object f, bint convert=1):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_167map_infer, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__map_infer, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":880
 * 
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_169to_object_array, NULL, __pyx_n_s_66); 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);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__to_object_array, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":904
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_171tuples_to_object_array, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_283, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":920
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_173to_object_array_tuples, NULL, __pyx_n_s_66); 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);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_286, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/inference.pyx":951
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_88 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_175fast_multiget, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__fast_multiget, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/lib.pyx":1
 * cimport numpy as np             # <<<<<<<<<<<<<<
 * cimport cython
 * import numpy as np
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 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_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

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;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (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 = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || 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)
{
    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 PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (result) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

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 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 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 PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else 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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

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 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,
                                               int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || 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 {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return -1;
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_ass_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_ass_slice(obj, cstart, cstop, value);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_ass_subscript))
#endif
    {
        int result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_ass_subscript(obj, py_slice, value);
#else
        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object does not support slice %s",
        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
bad:
    return -1;
}

static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyList_New(0);
    dest = PyList_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyListObject*)src)->ob_item + start,
        ((PyListObject*)dest)->ob_item,
        length);
    return dest;
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyTuple_New(0);
    dest = PyTuple_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyTupleObject*)src)->ob_item + start,
        ((PyTupleObject*)dest)->ob_item,
        length);
    return dest;
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    if (!r) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
    if (likely(nb) && likely(nb->nb_float)) {
        float_value = nb->nb_float(obj);
        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } 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 PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (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 (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            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)
        value = Py_None; /* Mark as deleted */
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(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
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    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 (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(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_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = 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 (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(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 (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!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 int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 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, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 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* qualname,
                                      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;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    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_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = 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_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    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_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    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)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (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, 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 void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

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_SetItem(dict, __pyx_n_s____pyx_vtable__, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

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) {
  #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) {
        PyObject *getbuffer_cobj = PyObject_GetItem(
            obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer);
        if (getbuffer_cobj) {
            getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj);
            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;
    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) {
        PyObject *releasebuffer_cobj = PyObject_GetItem(
            obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer);
        if (releasebuffer_cobj) {
            releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj);
            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, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__);
    if (!py_import)
        goto bad;
    #endif
    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, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                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);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            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
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
    #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:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

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_MAJOR_VERSION < 3
        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 = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____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 *qualname, PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;
    if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0)
        return NULL;
    if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0)
        return NULL;
    metaclass = PyDict_GetItem(dict, __pyx_n_s____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_MAJOR_VERSION < 3
        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 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_MAJOR_VERSION < 3
        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);
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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_MAJOR_VERSION < 3
    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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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_MAJOR_VERSION < 3
    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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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_MAJOR_VERSION < 3
    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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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_MAJOR_VERSION < 3
    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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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_MAJOR_VERSION < 3
    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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (signed long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(signed long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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_MAJOR_VERSION < 3
    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 CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            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 int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_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_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    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;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)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)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;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else /* PY_VERSION_HEX < 0x03030000 */
        if (PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_DATA_SIZE(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
        return PyUnicode_AsUTF8AndSize(o, length);
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
#endif /* PY_VERSION_HEX < 0x03030000 */
    } else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (r < 0) {
            return NULL;
        } else {
            return result;
        }
    }
}
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_MAJOR_VERSION < 3
  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_MAJOR_VERSION < 3
  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_MAJOR_VERSION < 3
    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)(size_t)val)) {
       if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred())
           PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
