Generated by Cython 0.20 on Fri Jan 24 09:22:25 2014

Raw output: lib.c

     1: cimport numpy as np

      /* "pandas/lib.pyx":1
     * cimport numpy as np             # <<<<<<<<<<<<<<
     * cimport cython
     * import numpy as np
     */
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     2: cimport cython

     3: import numpy as np

      /* "pandas/lib.pyx":3
     * cimport numpy as np
     * cimport cython
     * import numpy as np             # <<<<<<<<<<<<<<
     *
     * from numpy cimport *
     */
      __pyx_t_2 = __Pyx_Import(__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;

     4:

     5: from numpy cimport *

     6:

     7:

     8: cdef extern from "numpy/arrayobject.h":

     9:     cdef enum NPY_TYPES:

     10:         NPY_intp "NPY_INTP"

     11:

     12: from cpython cimport (PyDict_New, PyDict_GetItem, PyDict_SetItem,

     13:                       PyDict_Contains, PyDict_Keys,

     14:                       Py_INCREF, PyTuple_SET_ITEM,

     15:                       PyList_Check, PyFloat_Check,

     16:                       PyString_Check,

     17:                       PyBytes_Check,

     18:                       PyTuple_SetItem,

     19:                       PyTuple_New,

     20:                       PyObject_SetAttrString)

     21:

     22: cimport cpython

     23:

     24: isnan = np.isnan

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

     25: cdef double NaN = <double> np.NaN

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

     26: cdef double nan = NaN

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

     27: cdef double NAN = 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;

     28:

     29: from datetime import datetime as pydatetime

      /* "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(__pyx_n_s_datetime);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_datetime);
      __Pyx_GIVEREF(__pyx_n_s_datetime);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __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(__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;

     30:

     31: # this is our tseries.pxd

     32: from datetime cimport *

     33:

     34: from tslib cimport convert_to_tsobject, convert_to_timedelta64

     35: import tslib

      /* "pandas/lib.pyx":35
     *
     * from tslib cimport convert_to_tsobject, convert_to_timedelta64
     * import tslib             # <<<<<<<<<<<<<<
     * from tslib import NaT, Timestamp, repr_timedelta64
     *
     */
      __pyx_t_3 = __Pyx_Import(__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;

     36: from tslib import NaT, Timestamp, repr_timedelta64

      /* "pandas/lib.pyx":36
     * from tslib cimport convert_to_tsobject, convert_to_timedelta64
     * import tslib
     * from tslib import NaT, Timestamp, repr_timedelta64             # <<<<<<<<<<<<<<
     *
     * cdef int64_t NPY_NAT = util.get_nat()
     */
      __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_NaT);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_NaT);
      __Pyx_GIVEREF(__pyx_n_s_NaT);
      __Pyx_INCREF(__pyx_n_s_Timestamp);
      PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_Timestamp);
      __Pyx_GIVEREF(__pyx_n_s_Timestamp);
      __Pyx_INCREF(__pyx_n_s_repr_timedelta64);
      PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_repr_timedelta64);
      __Pyx_GIVEREF(__pyx_n_s_repr_timedelta64);
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_tslib, __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(__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;

     37:

     38: cdef int64_t NPY_NAT = util.get_nat()

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

     39:

     40: ctypedef unsigned char UChar

     41:

     42: cimport util

     43: from util cimport is_array, _checknull, _checknan

     44:

     45: cdef extern from "headers/stdint.h":

     46:     enum: UINT8_MAX

     47:     enum: INT64_MAX

     48:     enum: INT64_MIN

     49:

     50:

     51: cdef extern from "math.h":

     52:     double sqrt(double x)

     53:     double fabs(double)

     54:

     55: # import datetime C API

     56: PyDateTime_IMPORT

      /* "pandas/lib.pyx":56
     *
     * # import datetime C API
     * PyDateTime_IMPORT             # <<<<<<<<<<<<<<
     *
     * # initialize numpy
     */
      PyDateTime_IMPORT;

     57:

     58: # initialize numpy

     59: import_array()

      /* "pandas/lib.pyx":59
     *
     * # initialize numpy
     * import_array()             # <<<<<<<<<<<<<<
     * import_ufunc()
     *
     */
      import_array();

     60: import_ufunc()

      /* "pandas/lib.pyx":60
     * # initialize numpy
     * import_array()
     * import_ufunc()             # <<<<<<<<<<<<<<
     *
     * cpdef map_indices_list(list index):
     */
      import_ufunc();

     61:

     62: cpdef map_indices_list(list index):

    /* "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
      __Pyx_RefNannySetupContext("map_indices_list", 0);

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pandas.lib.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __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;

      /* function exit code */
      __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;
    }

     63:     '''

     64:     Produce a dict mapping the values of the input array to their respective

     65:     locations.

     66:

     67:     Example:

     68:         array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}

     69:

     70:     Better to do this with Cython because of the enormous speed boost.

     71:     '''

     72:     cdef Py_ssize_t i, length

     73:     cdef dict result = {}

      /* "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(__pyx_t_1);
      __pyx_v_result = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     74:

     75:     length = len(index)

      /* "pandas/lib.pyx":75
     *     cdef dict result = {}
     *
     *     length = len(index)             # <<<<<<<<<<<<<<
     *
     *     for i from 0 <= i < length:
     */
      if (unlikely(__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(__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;

     76:

     77:     for i from 0 <= i < length:

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

     78:         result[index[i]] = 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(__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(__pyx_v_index, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(PyDict_SetItem(__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;
      }

     79:

     80:     return result

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

     81:

     82:

     83: from libc.stdlib cimport malloc, free

     84:

     85: def ismember(ndarray arr, set values):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":85
     * from libc.stdlib cimport malloc, free
     *
     * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
     *     '''
     *     Checks whether
     */

      /* function exit code */
      __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":85
     * from libc.stdlib cimport malloc, free
     *
     * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
     *     '''
     *     Checks whether
     */
      __pyx_tuple__52 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_val); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__52);
      __Pyx_GIVEREF(__pyx_tuple__52);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_ismember, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     86:     '''

     87:     Checks whether

     88:

     89:     Parameters

     90:     ----------

     91:     arr : ndarray

     92:     values : set

     93:

     94:     Returns

     95:     -------

     96:     ismember : ndarray (boolean dtype)

     97:     '''

     98:     cdef:

     99:         Py_ssize_t i, n

     100:         ndarray[uint8_t] result

     101:         object val

     102:

     103:     n = len(arr)

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

     104:     result = np.empty(n, dtype=np.uint8)

      /* "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(__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, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     105:     for i in range(n):

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

     106:         val = util.get_value_at(arr, i)

        /* "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_SET(__pyx_v_val, __pyx_t_2);
        __pyx_t_2 = 0;

     107:         if val in values:

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

     108:             result[i] = 1

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

     109:         else:

     110:             result[i] = 0

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

     111:

     112:     return result.view(np.bool_)

      /* "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, __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(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     113:

     114: #----------------------------------------------------------------------

     115: # datetime / io related

     116:

     117: cdef int _EPOCH_ORD = 719163

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

     118:

     119: from datetime import date as pydate

      /* "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(__pyx_n_s_date);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_date);
      __Pyx_GIVEREF(__pyx_n_s_date);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __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(__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;

     120:

     121: cdef inline int64_t gmtime(object date):

    /* "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
      __Pyx_RefNannySetupContext("gmtime", 0);

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

      /* function exit code */
      __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, 0);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     122:     cdef int y, m, d, h, mn, s, days

     123:

     124:     y = PyDateTime_GET_YEAR(date)

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

     125:     m = PyDateTime_GET_MONTH(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));

     126:     d = PyDateTime_GET_DAY(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));

     127:     h = PyDateTime_DATE_GET_HOUR(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);

     128:     mn = PyDateTime_DATE_GET_MINUTE(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);

     129:     s = PyDateTime_DATE_GET_SECOND(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);

     130:

     131:     days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1

      /* "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 = __Pyx_PyInt_From_int(__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 = __Pyx_PyInt_From_int(__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, __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(__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, __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 = __Pyx_PyInt_From_int(__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 = __Pyx_PyInt_From_int(__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_As_int(__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;

     132:     return ((<int64_t> (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000

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

     133:

     134: cpdef object to_datetime(int64_t timestamp):

    /* "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
      __Pyx_RefNannySetupContext("to_datetime", 0);

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pandas.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/
    static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp) {
      __pyx_t_5numpy_int64_t __pyx_v_timestamp;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0);
      assert(__pyx_arg_timestamp); {
        __pyx_v_timestamp = __Pyx_PyInt_As_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));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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;

      /* function exit code */
      __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;
    }

     135:     return pydatetime.utcfromtimestamp(timestamp / 1000.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, __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(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     136:

     137: cpdef object to_timestamp(object dt):

    /* "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
      __Pyx_RefNannySetupContext("to_timestamp", 0);

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

      /* function exit code */
      __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));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __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;

      /* function exit code */
      __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;
    }

     138:     return gmtime(dt)

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

     139:

     140: def array_to_timestamp(ndarray[object, ndim=1] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":140
     *     return gmtime(dt)
     *
     * def array_to_timestamp(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
     *     cdef int i, n
     *     cdef ndarray[int64_t, ndim=1] result
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__54 = PyTuple_Pack(4, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__54);
      __Pyx_GIVEREF(__pyx_tuple__54);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_array_to_timestamp, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     141:     cdef int i, n

     142:     cdef ndarray[int64_t, ndim=1] result

     143:

     144:     n = len(arr)

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

     145:     result = np.empty(n, dtype=np.int64)

      /* "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 = __Pyx_PyInt_From_int(__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(__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, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     146:

     147:     for i from 0 <= i < n:

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

     148:         result[i] = gmtime(arr[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;
      }

     149:

     150:     return result

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

     151:

     152: def time64_to_datetime(ndarray[int64_t, ndim=1] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":152
     *     return result
     *
     * def time64_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
     *     cdef int i, n
     *     cdef ndarray[object, ndim=1] result
     */

      /* function exit code */
      __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":152
     *     return result
     *
     * def time64_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
     *     cdef int i, n
     *     cdef ndarray[object, ndim=1] result
     */
      __pyx_tuple__56 = PyTuple_Pack(4, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__56);
      __Pyx_GIVEREF(__pyx_tuple__56);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_time64_to_datetime, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     153:     cdef int i, n

     154:     cdef ndarray[object, ndim=1] result

     155:

     156:     n = len(arr)

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

     157:     result = np.empty(n, dtype=object)

      /* "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 = __Pyx_PyInt_From_int(__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(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     158:

     159:     for i from 0 <= i < n:

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

     160:         result[i] = to_datetime(arr[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;
      }

     161:

     162:     return result

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

     163:

     164: cdef inline int64_t get_timedelta64_value(val):

    /* "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
      __Pyx_RefNannySetupContext("get_timedelta64_value", 0);

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

      /* function exit code */
      __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, 0);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     165:     return val.view('i8')

      /* "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, __pyx_tuple_, 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_As_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;

      /* "pandas/lib.pyx":165
     *
     * cdef inline int64_t get_timedelta64_value(val):
     *     return val.view('i8')             # <<<<<<<<<<<<<<
     *
     * #----------------------------------------------------------------------
     */
      __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple_);
      __Pyx_GIVEREF(__pyx_tuple_);

     166:

     167: #----------------------------------------------------------------------

     168: # isnull / notnull related

     169:

     170: cdef double INF = <double> np.inf

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

     171: cdef double NEGINF = -INF

      /* "pandas/lib.pyx":171
     *
     * cdef double INF = <double> np.inf
     * cdef double NEGINF = -INF             # <<<<<<<<<<<<<<
     *
     * cpdef checknull(object val):
     */
      __pyx_v_6pandas_3lib_NEGINF = (-__pyx_v_6pandas_3lib_INF);

     172:

     173: cpdef checknull(object val):

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

    static PyObject *__pyx_pw_6pandas_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
    static PyObject *__pyx_f_6pandas_3lib_checknull(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("checknull", 0);

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

      /* function exit code */
      __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));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* function exit code */
      __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;
    }

     174:     if util.is_float_object(val) or util.is_complex_object(val):

      /* "pandas/lib.pyx":174
     *
     * cpdef checknull(object val):
     *     if util.is_float_object(val) or util.is_complex_object(val):             # <<<<<<<<<<<<<<
     *         return val != val # and val != INF and val != NEGINF
     *     elif util.is_datetime64_object(val):
     */
      __pyx_t_1 = (is_float_object(__pyx_v_val) != 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) {

     175:         return val != val # and val != INF and val != NEGINF

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

     176:     elif util.is_datetime64_object(val):

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

     177:         return get_datetime64_value(val) == NPY_NAT

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

     178:     elif val is NaT:

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

     179:         return True

        /* "pandas/lib.pyx":179
     *         return get_datetime64_value(val) == NPY_NAT
     *     elif val is NaT:
     *         return True             # <<<<<<<<<<<<<<
     *     elif util.is_timedelta64_object(val):
     *         return get_timedelta64_value(val) == NPY_NAT
     */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L0;
      }

     180:     elif util.is_timedelta64_object(val):

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

     181:         return get_timedelta64_value(val) == NPY_NAT

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

     182:     elif is_array(val):

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

     183:         return False

        /* "pandas/lib.pyx":183
     *         return get_timedelta64_value(val) == NPY_NAT
     *     elif is_array(val):
     *         return False             # <<<<<<<<<<<<<<
     *     else:
     *         return _checknull(val)
     */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
      }
      /*else*/ {

     184:     else:

     185:         return _checknull(val)

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

     186:

     187: cpdef checknull_old(object val):

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

    static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
    static PyObject *__pyx_f_6pandas_3lib_checknull_old(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("checknull_old", 0);

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

      /* function exit code */
      __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));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("checknull_old", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6pandas_3lib_checknull_old(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __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;
    }

     188:     if util.is_float_object(val) or util.is_complex_object(val):

      /* "pandas/lib.pyx":188
     *
     * cpdef checknull_old(object val):
     *     if util.is_float_object(val) or util.is_complex_object(val):             # <<<<<<<<<<<<<<
     *         return val != val or val == INF or val == NEGINF
     *     elif util.is_datetime64_object(val):
     */
      __pyx_t_1 = (is_float_object(__pyx_v_val) != 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) {

     189:         return val != val or val == INF or val == NEGINF

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

     190:     elif util.is_datetime64_object(val):

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

     191:         return get_datetime64_value(val) == NPY_NAT

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

     192:     elif val is NaT:

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

     193:         return True

        /* "pandas/lib.pyx":193
     *         return get_datetime64_value(val) == NPY_NAT
     *     elif val is NaT:
     *         return True             # <<<<<<<<<<<<<<
     *     elif util.is_timedelta64_object(val):
     *         return get_timedelta64_value(val) == NPY_NAT
     */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L0;
      }

     194:     elif util.is_timedelta64_object(val):

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

     195:         return get_timedelta64_value(val) == NPY_NAT

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

     196:     elif is_array(val):

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

     197:         return False

        /* "pandas/lib.pyx":197
     *         return get_timedelta64_value(val) == NPY_NAT
     *     elif is_array(val):
     *         return False             # <<<<<<<<<<<<<<
     *     else:
     *         return util._checknull(val)
     */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
      }
      /*else*/ {

     198:     else:

     199:         return util._checknull(val)

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

     200:

     201: def isscalar(object val):

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

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

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("isscalar", 0);

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":201
     *         return util._checknull(val)
     *
     * def isscalar(object val):             # <<<<<<<<<<<<<<
     *     return np.isscalar(val) or val is None or PyDateTime_Check(val)
     *
     */
      __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__58);
      __Pyx_GIVEREF(__pyx_tuple__58);

      /* "pandas/lib.pyx":201
     *         return util._checknull(val)
     *
     * def isscalar(object val):             # <<<<<<<<<<<<<<
     *     return np.isscalar(val) or val is None or PyDateTime_Check(val)
     *
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_17isscalar, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_isscalar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_isscalar, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     202:     return np.isscalar(val) or val is None or PyDateTime_Check(val)

      /* "pandas/lib.pyx":202
     *
     * def isscalar(object val):
     *     return np.isscalar(val) or val is None or PyDateTime_Check(val)             # <<<<<<<<<<<<<<
     *
     *
     */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isscalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_4) {
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_4 = (__pyx_v_val == Py_None);
        if (!__pyx_t_4) {
          __pyx_t_5 = PyDateTime_Check(__pyx_v_val);
          __pyx_t_6 = __pyx_t_5;
        } else {
          __pyx_t_6 = __pyx_t_4;
        }
        __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __pyx_t_1;
        __pyx_t_1 = 0;
      } else {
        __pyx_t_2 = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     203:

     204:

     205: @cython.wraparound(False)

     206: @cython.boundscheck(False)

     207: def isnullobj(ndarray[object] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      PyArrayObject *__pyx_v_result = 0;
      PyObject *__pyx_v_arobj = NULL;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
      __Pyx_Buffer __pyx_pybuffer_arr;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
      __Pyx_Buffer __pyx_pybuffer_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("isnullobj", 0);
      __pyx_pybuffer_result.pybuffer.buf = NULL;
      __pyx_pybuffer_result.refcount = 0;
      __pyx_pybuffernd_result.data = NULL;
      __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
      __pyx_pybuffer_arr.pybuffer.buf = NULL;
      __pyx_pybuffer_arr.refcount = 0;
      __pyx_pybuffernd_arr.data = NULL;
      __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

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

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

      /* "pandas/lib.pyx":207
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
     *     cdef Py_ssize_t i, n
     *     cdef object val
     */
      __pyx_tuple__60 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_result, __pyx_n_s_arobj); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__60);
      __Pyx_GIVEREF(__pyx_tuple__60);

      /* "pandas/lib.pyx":207
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
     *     cdef Py_ssize_t i, n
     *     cdef object val
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_19isnullobj, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnullobj, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_isnullobj, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     208:     cdef Py_ssize_t i, n

     209:     cdef object val

     210:     cdef ndarray[uint8_t] result

     211:

     212:     n = len(arr)

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

     213:     result = np.zeros(n, dtype=np.uint8)

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

     214:     for i from 0 <= i < n:

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

     215:         arobj = arr[i]

        /* "pandas/lib.pyx":215
     *     result = np.zeros(n, dtype=np.uint8)
     *     for i from 0 <= i < n:
     *         arobj = arr[i]             # <<<<<<<<<<<<<<
     *         result[i] = arobj is NaT or _checknull(arobj)
     *     return result.view(np.bool_)
     */
        __pyx_t_12 = __pyx_v_i;
        __pyx_t_6 = (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_XDECREF_SET(__pyx_v_arobj, __pyx_t_6);
        __pyx_t_6 = 0;

     216:         result[i] = arobj is NaT or _checknull(arobj)

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

     217:     return result.view(np.bool_)

      /* "pandas/lib.pyx":217
     *         arobj = arr[i]
     *         result[i] = arobj is NaT or _checknull(arobj)
     *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
     *
     * @cython.wraparound(False)
     */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __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, __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(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     218:

     219: @cython.wraparound(False)

     220: @cython.boundscheck(False)

     221: def isnullobj_old(ndarray[object] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":221
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def isnullobj_old(ndarray[object] arr):             # <<<<<<<<<<<<<<
     *     cdef Py_ssize_t i, n
     *     cdef object val
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__62 = PyTuple_Pack(5, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__62);
      __Pyx_GIVEREF(__pyx_tuple__62);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_isnullobj_old, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     222:     cdef Py_ssize_t i, n

     223:     cdef object val

     224:     cdef ndarray[uint8_t] result

     225:

     226:     n = len(arr)

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

     227:     result = np.zeros(n, dtype=np.uint8)

      /* "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(__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, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     228:     for i from 0 <= i < n:

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

     229:         result[i] = util._checknull_old(arr[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;
      }

     230:     return result.view(np.bool_)

      /* "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, __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(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     231:

     232:

     233: @cython.wraparound(False)

     234: @cython.boundscheck(False)

     235: def isnullobj2d(ndarray[object, ndim=2] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* function exit code */
      __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;
    }

      /* "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_tuple__64 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_m, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__64);
      __Pyx_GIVEREF(__pyx_tuple__64);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_isnullobj2d, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     236:     cdef Py_ssize_t i, j, n, m

     237:     cdef object val

     238:     cdef ndarray[uint8_t, ndim=2] result

     239:

     240:     n, m = (<object> arr).shape

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

     241:     result = np.zeros((n, m), dtype=np.uint8)

      /* "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, __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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__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, __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, __pyx_t_2, __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(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__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;

     242:     for i from 0 <= i < n:

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

     243:         for j from 0 <= j < m:

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

     244:             val = arr[i, 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_SET(__pyx_v_val, __pyx_t_8);
          __pyx_t_8 = 0;

     245:             if checknull(val):

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

     246:                 result[i, j] = 1

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

     247:     return result.view(np.bool_)

      /* "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, __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(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     248:

     249: @cython.wraparound(False)

     250: @cython.boundscheck(False)

     251: def isnullobj_old(ndarray[object] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":251
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def isnullobj_old(ndarray[object] arr):             # <<<<<<<<<<<<<<
     *     cdef Py_ssize_t i, n
     *     cdef object val
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__66 = PyTuple_Pack(5, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__66);
      __Pyx_GIVEREF(__pyx_tuple__66);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_isnullobj_old, 251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     252:     cdef Py_ssize_t i, n

     253:     cdef object val

     254:     cdef ndarray[uint8_t] result

     255:

     256:     n = len(arr)

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

     257:     result = np.zeros(n, dtype=np.uint8)

      /* "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(__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, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     258:     for i from 0 <= i < n:

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

     259:         result[i] = util._checknull_old(arr[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;
      }

     260:     return result.view(np.bool_)

      /* "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, __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(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     261:

     262:

     263: @cython.wraparound(False)

     264: @cython.boundscheck(False)

     265: def isnullobj2d_old(ndarray[object, ndim=2] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* function exit code */
      __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;
    }

      /* "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_tuple__68 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_m, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__68);
      __Pyx_GIVEREF(__pyx_tuple__68);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_isnullobj2d_old, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     266:     cdef Py_ssize_t i, j, n, m

     267:     cdef object val

     268:     cdef ndarray[uint8_t, ndim=2] result

     269:

     270:     n, m = (<object> arr).shape

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

     271:     result = np.zeros((n, m), dtype=np.uint8)

      /* "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, __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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__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, __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, __pyx_t_2, __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(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__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;

     272:     for i from 0 <= i < n:

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

     273:         for j from 0 <= j < m:

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

     274:             val = arr[i, 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_SET(__pyx_v_val, __pyx_t_8);
          __pyx_t_8 = 0;

     275:             if checknull_old(val):

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

     276:                 result[i, j] = 1

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

     277:     return result.view(np.bool_)

      /* "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, __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(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     278:

     279: def list_to_object_array(list obj):

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

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
    static char __pyx_doc_6pandas_3lib_28list_to_object_array[] = "\n    Convert list to object ndarray. Seriously can't believe I had to write this\n    function\n    ";
    static PyMethodDef __pyx_mdef_6pandas_3lib_29list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_29list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_28list_to_object_array)};
    static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("list_to_object_array (wrapper)", 0);
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = __pyx_pf_6pandas_3lib_28list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj));
      CYTHON_UNUSED int __pyx_lineno = 0;
      CYTHON_UNUSED const char *__pyx_filename = NULL;
      CYTHON_UNUSED int __pyx_clineno = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* function exit code */
      __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;
    }

      /* "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_tuple__70 = PyTuple_Pack(4, __pyx_n_s_obj, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__70);
      __Pyx_GIVEREF(__pyx_tuple__70);

      /* "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_pandas_lib); 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_list_to_object_array, __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;
      __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_list_to_object_array, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     280:     '''

     281:     Convert list to object ndarray. Seriously can't believe I had to write this

     282:     function

     283:     '''

     284:     cdef:

     285:         Py_ssize_t i, n

     286:         ndarray[object] arr

     287:

     288:     n = len(obj)

      /* "pandas/lib.pyx":288
     *         ndarray[object] arr
     *
     *     n = len(obj)             # <<<<<<<<<<<<<<
     *     arr = np.empty(n, dtype=object)
     *
     */
      if (unlikely(__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(__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;

     289:     arr = np.empty(n, dtype=object)

      /* "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(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     290:

     291:     for i from 0 <= i < n:

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

     292:         arr[i] = obj[i]

        /* "pandas/lib.pyx":292
     *
     *     for i from 0 <= i < n:
     *         arr[i] = obj[i]             # <<<<<<<<<<<<<<
     *
     *     return arr
     */
        if (unlikely(__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(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__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;
      }

     293:

     294:     return arr

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

     295:

     296:

     297: @cython.wraparound(False)

     298: @cython.boundscheck(False)

     299: def fast_unique(ndarray[object] values):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":299
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def fast_unique(ndarray[object] values):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(values)
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__72 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__72);
      __Pyx_GIVEREF(__pyx_tuple__72);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_fast_unique, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     300:     cdef:

     301:         Py_ssize_t i, n = len(values)

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

     302:         list uniques = []

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

     303:         dict table = {}

      /* "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(__pyx_t_2);
      __pyx_v_table = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     304:         object val, stub = 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;

     305:

     306:     for i from 0 <= i < n:

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

     307:         val = values[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_SET(__pyx_v_val, __pyx_t_2);
        __pyx_t_2 = 0;

     308:         if val not in table:

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

     309:             table[val] = stub

          /* "pandas/lib.pyx":309
     *         val = values[i]
     *         if val not in table:
     *             table[val] = stub             # <<<<<<<<<<<<<<
     *             uniques.append(val)
     *     try:
     */
          if (unlikely(PyDict_SetItem(__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;}

     310:             uniques.append(val)

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

     311:     try:

      /* "pandas/lib.pyx":311
     *             table[val] = stub
     *             uniques.append(val)
     *     try:             # <<<<<<<<<<<<<<
     *         uniques.sort()
     *     except Exception:
     */
      {
        /*try:*/ {

     312:         uniques.sort()

          /* "pandas/lib.pyx":312
     *             uniques.append(val)
     *     try:
     *         uniques.sort()             # <<<<<<<<<<<<<<
     *     except Exception:
     *         pass
     */
          __pyx_t_6 = PyList_Sort(__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;

     313:     except Exception:

        /* "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;
        }
        goto __pyx_L8_except_error;
        __pyx_L8_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_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:;
      }

     314:         pass

     315:

     316:     return uniques

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

     317:

     318: @cython.wraparound(False)

     319: @cython.boundscheck(False)

     320: def fast_unique_multiple(list arrays):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":320
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
     *     cdef:
     *         ndarray[object] buf
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":320
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
     *     cdef:
     *         ndarray[object] buf
     */
      __pyx_tuple__74 = PyTuple_Pack(10, __pyx_n_s_arrays, __pyx_n_s_buf, __pyx_n_s_k, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__74);
      __Pyx_GIVEREF(__pyx_tuple__74);

      /* "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_pandas_lib); 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_fast_unique_multiple, __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;
      __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_fast_unique_multiple, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     321:     cdef:

     322:         ndarray[object] buf

     323:         Py_ssize_t k = len(arrays)

      /* "pandas/lib.pyx":323
     *     cdef:
     *         ndarray[object] buf
     *         Py_ssize_t k = len(arrays)             # <<<<<<<<<<<<<<
     *         Py_ssize_t i, j, n
     *         list uniques = []
     */
      if (unlikely(__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(__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;

     324:         Py_ssize_t i, j, n

     325:         list uniques = []

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

     326:         dict table = {}

      /* "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(__pyx_t_2);
      __pyx_v_table = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     327:         object val, stub = 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;

     328:

     329:     for i from 0 <= i < k:

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

     330:         buf = arrays[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(__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_SET(__pyx_v_buf, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

     331:         n = len(buf)

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

     332:         for j from 0 <= j < n:

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

     333:             val = buf[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_SET(__pyx_v_val, __pyx_t_2);
          __pyx_t_2 = 0;

     334:             if val not in table:

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

     335:                 table[val] = stub

            /* "pandas/lib.pyx":335
     *             val = buf[j]
     *             if val not in table:
     *                 table[val] = stub             # <<<<<<<<<<<<<<
     *                 uniques.append(val)
     *     try:
     */
            if (unlikely(PyDict_SetItem(__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;}

     336:                 uniques.append(val)

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

     337:     try:

      /* "pandas/lib.pyx":337
     *                 table[val] = stub
     *                 uniques.append(val)
     *     try:             # <<<<<<<<<<<<<<
     *         uniques.sort()
     *     except Exception:
     */
      {
        /*try:*/ {

     338:         uniques.sort()

          /* "pandas/lib.pyx":338
     *                 uniques.append(val)
     *     try:
     *         uniques.sort()             # <<<<<<<<<<<<<<
     *     except Exception:
     *         pass
     */
          __pyx_t_11 = PyList_Sort(__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;

     339:     except Exception:

        /* "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;
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;
        __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:;
      }

     340:         pass

     341:

     342:     return uniques

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

     343:

     344: @cython.wraparound(False)

     345: @cython.boundscheck(False)

     346: def fast_unique_multiple_list(list lists):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __Pyx_RefNannySetupContext("fast_unique_multiple_list", 0);

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":346
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def fast_unique_multiple_list(list lists):             # <<<<<<<<<<<<<<
     *     cdef:
     *         list buf
     */
      __pyx_tuple__76 = PyTuple_Pack(10, __pyx_n_s_lists, __pyx_n_s_buf, __pyx_n_s_k, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__76);
      __Pyx_GIVEREF(__pyx_tuple__76);

      /* "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_pandas_lib); 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_fast_unique_multiple_list, __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;
      __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_fast_unique_multiple_list, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     347:     cdef:

     348:         list buf

     349:         Py_ssize_t k = len(lists)

      /* "pandas/lib.pyx":349
     *     cdef:
     *         list buf
     *         Py_ssize_t k = len(lists)             # <<<<<<<<<<<<<<
     *         Py_ssize_t i, j, n
     *         list uniques = []
     */
      if (unlikely(__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(__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;

     350:         Py_ssize_t i, j, n

     351:         list uniques = []

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

     352:         dict table = {}

      /* "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(__pyx_t_2);
      __pyx_v_table = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     353:         object val, stub = 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;

     354:

     355:     for i from 0 <= i < k:

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

     356:         buf = lists[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(__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 %.16s, got %.200s", "list", 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_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
        __pyx_t_2 = 0;

     357:         n = len(buf)

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

     358:         for j from 0 <= j < n:

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

     359:             val = buf[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(__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_SET(__pyx_v_val, __pyx_t_2);
          __pyx_t_2 = 0;

     360:             if val not in table:

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

     361:                 table[val] = stub

            /* "pandas/lib.pyx":361
     *             val = buf[j]
     *             if val not in table:
     *                 table[val] = stub             # <<<<<<<<<<<<<<
     *                 uniques.append(val)
     *     try:
     */
            if (unlikely(PyDict_SetItem(__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;}

     362:                 uniques.append(val)

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

     363:     try:

      /* "pandas/lib.pyx":363
     *                 table[val] = stub
     *                 uniques.append(val)
     *     try:             # <<<<<<<<<<<<<<
     *         uniques.sort()
     *     except Exception:
     */
      {
        /*try:*/ {

     364:         uniques.sort()

          /* "pandas/lib.pyx":364
     *                 uniques.append(val)
     *     try:
     *         uniques.sort()             # <<<<<<<<<<<<<<
     *     except Exception:
     *         pass
     */
          __pyx_t_6 = PyList_Sort(__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;

     365:     except Exception:

        /* "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;
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_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:;
      }

     366:         pass

     367:

     368:     return uniques

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

     369:

     370: @cython.wraparound(False)

     371: @cython.boundscheck(False)

     372: def fast_unique_multiple_list_gen(object gen):

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

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

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen", 0);

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":372
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def fast_unique_multiple_list_gen(object gen):             # <<<<<<<<<<<<<<
     *     cdef:
     *         list buf
     */
      __pyx_tuple__78 = PyTuple_Pack(8, __pyx_n_s_gen, __pyx_n_s_buf, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__78);
      __Pyx_GIVEREF(__pyx_tuple__78);

      /* "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_pandas_lib); 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_fast_unique_multiple_list_gen, __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;
      __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_fast_unique_multiple_list_gen, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     373:     cdef:

     374:         list buf

     375:         Py_ssize_t j, n

     376:         list uniques = []

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

     377:         dict table = {}

      /* "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(__pyx_t_1);
      __pyx_v_table = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     378:         object val, stub = 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;

     379:

     380:     for buf in gen:

      /* "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)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, 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 %.16s, got %.200s", "list", 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_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
        __pyx_t_4 = 0;

     381:         n = len(buf)

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

     382:         for j from 0 <= j < n:

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

     383:             val = buf[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(__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_SET(__pyx_v_val, __pyx_t_4);
          __pyx_t_4 = 0;

     384:             if val not in table:

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

     385:                 table[val] = stub

            /* "pandas/lib.pyx":385
     *             val = buf[j]
     *             if val not in table:
     *                 table[val] = stub             # <<<<<<<<<<<<<<
     *                 uniques.append(val)
     *
     */
            if (unlikely(PyDict_SetItem(__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;}

     386:                 uniques.append(val)

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

     387:

     388:     try:

      /* "pandas/lib.pyx":388
     *                 uniques.append(val)
     *
     *     try:             # <<<<<<<<<<<<<<
     *         uniques.sort()
     *     except Exception:
     */
      {
        /*try:*/ {

     389:         uniques.sort()

          /* "pandas/lib.pyx":389
     *
     *     try:
     *         uniques.sort()             # <<<<<<<<<<<<<<
     *     except Exception:
     *         pass
     */
          __pyx_t_8 = PyList_Sort(__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;

     390:     except Exception:

        /* "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;
        }
        goto __pyx_L10_except_error;
        __pyx_L10_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_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:;
      }

     391:         pass

     392:

     393:     return uniques

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

     394:

     395: @cython.wraparound(False)

     396: @cython.boundscheck(False)

     397: def dicts_to_array(list dicts, list columns):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":397
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def dicts_to_array(list dicts, list columns):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, j, k, n
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__80 = PyTuple_Pack(10, __pyx_n_s_dicts, __pyx_n_s_columns, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_row, __pyx_n_s_col, __pyx_n_s_onan); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__80);
      __Pyx_GIVEREF(__pyx_tuple__80);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_dicts_to_array, 397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     398:     cdef:

     399:         Py_ssize_t i, j, k, n

     400:         ndarray[object, ndim=2] result

     401:         dict row

     402:         object col, onan = np.nan

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

     403:

     404:     k = len(columns)

      /* "pandas/lib.pyx":404
     *         object col, onan = np.nan
     *
     *     k = len(columns)             # <<<<<<<<<<<<<<
     *     n = len(dicts)
     *
     */
      if (unlikely(__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(__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;

     405:     n = len(dicts)

      /* "pandas/lib.pyx":405
     *
     *     k = len(columns)
     *     n = len(dicts)             # <<<<<<<<<<<<<<
     *
     *     result = np.empty((n, k), dtype='O')
     */
      if (unlikely(__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(__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;

     406:

     407:     result = np.empty((n, k), dtype='O')

      /* "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, __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[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[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;

     408:

     409:     for i in range(n):

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

     410:         row = dicts[i]

        /* "pandas/lib.pyx":410
     *
     *     for i in range(n):
     *         row = dicts[i]             # <<<<<<<<<<<<<<
     *         for j in range(k):
     *             col = columns[j]
     */
        if (unlikely(__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 %.16s, got %.200s", "dict", 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_SET(__pyx_v_row, ((PyObject*)__pyx_t_2));
        __pyx_t_2 = 0;

     411:         for j in range(k):

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

     412:             col = columns[j]

          /* "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(__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_SET(__pyx_v_col, __pyx_t_2);
          __pyx_t_2 = 0;

     413:             if col in row:

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

     414:                 result[i, j] = row[col]

            /* "pandas/lib.pyx":414
     *             col = columns[j]
     *             if col in row:
     *                 result[i, j] = row[col]             # <<<<<<<<<<<<<<
     *             else:
     *                 result[i, j] = onan
     */
            if (unlikely(__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(__pyx_v_row, __pyx_v_col); if (unlikely(__pyx_t_2 == NULL)) {__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*/ {

     415:             else:

     416:                 result[i, j] = onan

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

     417:

     418:     return result

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

     419:

     420: def fast_zip(list ndarrays):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":420
     *     return result
     *
     * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
     *     '''
     *     For zipping multiple ndarrays into an ndarray of tuples
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":420
     *     return result
     *
     * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
     *     '''
     *     For zipping multiple ndarrays into an ndarray of tuples
     */
      __pyx_tuple__82 = PyTuple_Pack(10, __pyx_n_s_ndarrays, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_it, __pyx_n_s_val, __pyx_n_s_tup, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__82);
      __Pyx_GIVEREF(__pyx_tuple__82);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_fast_zip, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     421:     '''

     422:     For zipping multiple ndarrays into an ndarray of tuples

     423:     '''

     424:     cdef:

     425:         Py_ssize_t i, j, k, n

     426:         ndarray[object] result

     427:         flatiter it

     428:         object val, tup

     429:

     430:     k = len(ndarrays)

      /* "pandas/lib.pyx":430
     *         object val, tup
     *
     *     k = len(ndarrays)             # <<<<<<<<<<<<<<
     *     n = len(ndarrays[0])
     *
     */
      if (unlikely(__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(__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;

     431:     n = len(ndarrays[0])

      /* "pandas/lib.pyx":431
     *
     *     k = len(ndarrays)
     *     n = len(ndarrays[0])             # <<<<<<<<<<<<<<
     *
     *     result = np.empty(n, dtype=object)
     */
      if (unlikely(__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(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__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;

     432:

     433:     result = np.empty(n, dtype=object)

      /* "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(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     434:

     435:     # initialize tuples on first pass

     436:     arr = ndarrays[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(__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(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__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;

     437:     it = <flatiter> PyArray_IterNew(arr)

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

     438:     for i in range(n):

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

     439:         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))

        /* "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_SET(__pyx_v_val, __pyx_t_2);
        __pyx_t_2 = 0;

     440:         tup = PyTuple_New(k)

        /* "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 = 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_SET(__pyx_v_tup, __pyx_t_2);
        __pyx_t_2 = 0;

     441:

     442:         PyTuple_SET_ITEM(tup, 0, val)

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

     443:         Py_INCREF(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);

     444:         result[i] = tup

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

     445:         PyArray_ITER_NEXT(it)

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

     446:

     447:     for j in range(1, k):

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

     448:         arr = ndarrays[j]

        /* "pandas/lib.pyx":448
     *
     *     for j in range(1, k):
     *         arr = ndarrays[j]             # <<<<<<<<<<<<<<
     *         it = <flatiter> PyArray_IterNew(arr)
     *         if len(arr) != n:
     */
        if (unlikely(__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(__pyx_v_ndarrays, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_2);
        __pyx_t_2 = 0;

     449:         it = <flatiter> PyArray_IterNew(arr)

        /* "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_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_5));
        __pyx_t_5 = 0;

     450:         if len(arr) != n:

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

     451:             raise ValueError('all arrays must be same length')

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

      /* "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_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_all_arrays_must_be_same_length); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__2);
      __Pyx_GIVEREF(__pyx_tuple__2);

     452:

     453:         for i in range(n):

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

     454:             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))

          /* "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_SET(__pyx_v_val, __pyx_t_5);
          __pyx_t_5 = 0;

     455:             PyTuple_SET_ITEM(result[i], j, val)

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

     456:             Py_INCREF(val)

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

     457:             PyArray_ITER_NEXT(it)

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

     458:

     459:     return result

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

     460:

     461: def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":461
     *     return result
     *
     * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(indexer)
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__84 = PyTuple_Pack(6, __pyx_n_s_indexer, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_rev_indexer, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__84);
      __Pyx_GIVEREF(__pyx_tuple__84);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_get_reverse_indexer, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     462:     cdef:

     463:         Py_ssize_t i, n = len(indexer)

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

     464:         ndarray[int64_t] rev_indexer

     465:         int64_t idx

     466:

     467:     rev_indexer = np.empty(length, dtype=np.int64)

      /* "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(__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, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     468:     rev_indexer.fill(-1)

      /* "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, __pyx_tuple__3, 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":468
     *
     *     rev_indexer = np.empty(length, dtype=np.int64)
     *     rev_indexer.fill(-1)             # <<<<<<<<<<<<<<
     *     for i in range(n):
     *         idx = indexer[i]
     */
      __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__3);
      __Pyx_GIVEREF(__pyx_tuple__3);

     469:     for i in range(n):

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

     470:         idx = indexer[i]

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

     471:         if idx != -1:

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

     472:             rev_indexer[idx] = i

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

     473:

     474:     return rev_indexer

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

     475:

     476:

     477: def has_infs_f4(ndarray[float32_t] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":477
     *
     *
     * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(arr)
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":477
     *
     *
     * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(arr)
     */
      __pyx_tuple__86 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_inf, __pyx_n_s_neginf, __pyx_n_s_val); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__86);
      __Pyx_GIVEREF(__pyx_tuple__86);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_has_infs_f4, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     478:     cdef:

     479:         Py_ssize_t i, n = len(arr)

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

     480:         float32_t inf, neginf, val

     481:

     482:     inf = np.inf

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

     483:     neginf = -inf

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

     484:

     485:     for i in range(n):

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

     486:         val = arr[i]

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

     487:         if val == inf or val == neginf:

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

     488:             return True

          /* "pandas/lib.pyx":488
     *         val = arr[i]
     *         if val == inf or val == neginf:
     *             return True             # <<<<<<<<<<<<<<
     *     return False
     *
     */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_True);
          __pyx_r = Py_True;
          goto __pyx_L0;
        }
      }

     489:     return False

      /* "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_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

     490:

     491: def has_infs_f8(ndarray[float64_t] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":491
     *     return False
     *
     * def has_infs_f8(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(arr)
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":491
     *     return False
     *
     * def has_infs_f8(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(arr)
     */
      __pyx_tuple__88 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_inf, __pyx_n_s_neginf, __pyx_n_s_val); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__88);
      __Pyx_GIVEREF(__pyx_tuple__88);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_has_infs_f8, 491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     492:     cdef:

     493:         Py_ssize_t i, n = len(arr)

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

     494:         float64_t inf, neginf, val

     495:

     496:     inf = np.inf

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

     497:     neginf = -inf

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

     498:

     499:     for i in range(n):

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

     500:         val = arr[i]

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

     501:         if val == inf or val == neginf:

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

     502:             return True

          /* "pandas/lib.pyx":502
     *         val = arr[i]
     *         if val == inf or val == neginf:
     *             return True             # <<<<<<<<<<<<<<
     *     return False
     *
     */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_True);
          __pyx_r = Py_True;
          goto __pyx_L0;
        }
      }

     503:     return False

      /* "pandas/lib.pyx":503
     *         if val == inf or val == neginf:
     *             return True
     *     return False             # <<<<<<<<<<<<<<
     *
     * def convert_timestamps(ndarray values):
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

     504:

     505: def convert_timestamps(ndarray values):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":505
     *     return False
     *
     * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
     *     cdef:
     *         object val, f, result
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":505
     *     return False
     *
     * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
     *     cdef:
     *         object val, f, result
     */
      __pyx_tuple__90 = PyTuple_Pack(9, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_f, __pyx_n_s_result, __pyx_n_s_cache_2, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_out, __pyx_n_s_datetime); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__90);
      __Pyx_GIVEREF(__pyx_tuple__90);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_convert_timestamps, 505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     506:     cdef:

     507:         object val, f, result

     508:         dict cache = {}

      /* "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(__pyx_t_1);
      __pyx_v_cache = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     509:         Py_ssize_t i, n = len(values)

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

     510:         ndarray[object] out

     511:

     512:     # for HDFStore, a bit temporary but...

     513:

     514:     from datetime import datetime

      /* "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(__pyx_n_s_datetime);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
      __Pyx_GIVEREF(__pyx_n_s_datetime);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __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(__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;

     515:     f = datetime.fromtimestamp

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

     516:

     517:     out = np.empty(n, dtype='O')

      /* "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(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     518:

     519:     for i in range(n):

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

     520:         val = util.get_value_1d(values, i)

        /* "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_SET(__pyx_v_val, __pyx_t_5);
        __pyx_t_5 = 0;

     521:         if val in cache:

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

     522:             out[i] = cache[val]

          /* "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(__pyx_v_cache, __pyx_v_val); if (unlikely(__pyx_t_5 == NULL)) {__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*/ {

     523:         else:

     524:             cache[val] = out[i] = f(val)

          /* "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, __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(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(PyDict_SetItem(__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:;
      }

     525:

     526:     return out

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

     527:

     528: def maybe_indices_to_slice(ndarray[int64_t] indices):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":528
     *     return out
     *
     * def maybe_indices_to_slice(ndarray[int64_t] indices):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(indices)
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":528
     *     return out
     *
     * def maybe_indices_to_slice(ndarray[int64_t] indices):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(indices)
     */
      __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_indices, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__92);
      __Pyx_GIVEREF(__pyx_tuple__92);

      /* "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_pandas_lib); 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_maybe_indices_to_slice, __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;
      __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_maybe_indices_to_slice, 528, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     529:     cdef:

     530:         Py_ssize_t i, n = len(indices)

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

     531:

     532:     if n == 0:

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

     533:         return indices

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

     534:

     535:     for i in range(1, n):

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

     536:         if indices[i] - indices[i - 1] != 1:

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

     537:             return indices

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

     538:     return slice(indices[0], indices[n - 1] + 1)

      /* "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_From_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_From_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))), __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(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L0;

     539:

     540:

     541: def maybe_booleans_to_slice(ndarray[uint8_t] mask):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":541
     *
     *
     * def maybe_booleans_to_slice(ndarray[uint8_t] mask):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(mask)
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":541
     *
     *
     * def maybe_booleans_to_slice(ndarray[uint8_t] mask):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(mask)
     */
      __pyx_tuple__94 = PyTuple_Pack(7, __pyx_n_s_mask, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_started, __pyx_n_s_finished); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__94);
      __Pyx_GIVEREF(__pyx_tuple__94);

      /* "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_pandas_lib); 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_maybe_booleans_to_slice, __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;
      __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_maybe_booleans_to_slice, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     542:     cdef:

     543:         Py_ssize_t i, n = len(mask)

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

     544:         Py_ssize_t start, end

     545:         bint started = 0, finished = 0

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

     546:

     547:     for i in range(n):

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

     548:         if mask[i]:

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

     549:             if finished:

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

     550:                 return mask.view(np.bool_)

            /* "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, __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(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_r = __pyx_t_8;
            __pyx_t_8 = 0;
            goto __pyx_L0;
          }

     551:             if not started:

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

     552:                 started = 1

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

     553:                 start = i

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

     554:         else:

     555:             if finished:

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

     556:                 continue

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

     557:

     558:             if started:

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

     559:                 end = i

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

     560:                 finished = 1

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

     561:

     562:     if not started:

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

     563:         return slice(0, 0)

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

      /* "pandas/lib.pyx":563
     *
     *     if not started:
     *         return slice(0, 0)             # <<<<<<<<<<<<<<
     *     if not finished:
     *         return slice(start, None)
     */
      __pyx_tuple__4 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__4);
      __Pyx_GIVEREF(__pyx_tuple__4);

     564:     if not finished:

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

     565:         return slice(start, None)

        /* "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))), __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(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L0;
      }
      /*else*/ {

     566:     else:

     567:         return slice(start, end)

        /* "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))), __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(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L0;
      }

     568:

     569:

     570: @cython.wraparound(False)

     571: @cython.boundscheck(False)

     572: def scalar_compare(ndarray[object] values, object val, object op):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":572
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def scalar_compare(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
     *     import operator
     *     cdef:
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":572
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def scalar_compare(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
     *     import operator
     *     cdef:
     */
      __pyx_tuple__96 = PyTuple_Pack(9, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_op, __pyx_n_s_operator, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_flag, __pyx_n_s_x); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__96);
      __Pyx_GIVEREF(__pyx_tuple__96);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_scalar_compare, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     573:     import operator

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

     574:     cdef:

     575:         Py_ssize_t i, n = len(values)

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

     576:         ndarray[uint8_t, cast=True] result

     577:         int flag

     578:         object x

     579:

     580:     if op is operator.lt:

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

     581:         flag = cpython.Py_LT

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

     582:     elif op is operator.le:

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

     583:         flag = cpython.Py_LE

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

     584:     elif op is operator.gt:

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

     585:         flag = cpython.Py_GT

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

     586:     elif op is operator.ge:

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

     587:         flag = cpython.Py_GE

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

     588:     elif op is operator.eq:

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

     589:         flag = cpython.Py_EQ

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

     590:     elif op is operator.ne:

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

     591:         flag = cpython.Py_NE

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

     592:     else:

     593:         raise ValueError('Unrecognized operator')

        /* "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, __pyx_tuple__5, 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":593
     *         flag = cpython.Py_NE
     *     else:
     *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
     *
     *     result = np.empty(n, dtype=bool).view(np.uint8)
     */
      __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Unrecognized_operator); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__5);
      __Pyx_GIVEREF(__pyx_tuple__5);

     594:

     595:     result = np.empty(n, dtype=bool).view(np.uint8)

      /* "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(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __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, __pyx_t_6, __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(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__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, __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(__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;

     596:

     597:     if flag == cpython.Py_NE:

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

     598:         for i in range(n):

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

     599:             x = values[i]

          /* "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_SET(__pyx_v_x, __pyx_t_6);
          __pyx_t_6 = 0;

     600:             if _checknull(x):

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

     601:                 result[i] = True

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

     602:             else:

     603:                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)

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

     604:     else:

     605:         for i in range(n):

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

     606:             x = values[i]

          /* "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_SET(__pyx_v_x, __pyx_t_6);
          __pyx_t_6 = 0;

     607:             if _checknull(x):

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

     608:                 result[i] = False

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

     609:             else:

     610:                 result[i] = cpython.PyObject_RichCompareBool(x, val, flag)

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

     611:

     612:     return result.view(bool)

      /* "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, __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(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     613:

     614: @cython.wraparound(False)

     615: @cython.boundscheck(False)

     616: def vec_compare(ndarray[object] left, ndarray[object] right, object op):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __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":616
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def vec_compare(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
     *     import operator
     *     cdef:
     */

      /* function exit code */
      __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;
    }

      /* "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_tuple__98 = PyTuple_Pack(10, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_op, __pyx_n_s_operator, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_flag, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__98);
      __Pyx_GIVEREF(__pyx_tuple__98);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_vec_compare, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     617:     import operator

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

     618:     cdef:

     619:         Py_ssize_t i, n = len(left)

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

     620:         ndarray[uint8_t, cast=True] result

     621:         int flag

     622:

     623:     if n != len(right):

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

     624:         raise ValueError('Arrays were different lengths: %d vs %d'

        /* "pandas/lib.pyx":624
     *
     *     if n != len(right):
     *         raise ValueError('Arrays were different lengths: %d vs %d'             # <<<<<<<<<<<<<<
     *                          % (n, len(right)))
     *
     */
        __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, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __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(__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;}
      }

     625:                          % (n, len(right)))

        /* "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 = __Pyx_PyString_Format(__pyx_kp_s_Arrays_were_different_lengths_d, __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(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     626:

     627:     if op is operator.lt:

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

     628:         flag = cpython.Py_LT

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

     629:     elif op is operator.le:

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

     630:         flag = cpython.Py_LE

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

     631:     elif op is operator.gt:

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

     632:         flag = cpython.Py_GT

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

     633:     elif op is operator.ge:

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

     634:         flag = cpython.Py_GE

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

     635:     elif op is operator.eq:

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

     636:         flag = cpython.Py_EQ

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

     637:     elif op is operator.ne:

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

     638:         flag = cpython.Py_NE

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

     639:     else:

     640:         raise ValueError('Unrecognized operator')

        /* "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, __pyx_tuple__6, 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":640
     *         flag = cpython.Py_NE
     *     else:
     *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
     *
     *     result = np.empty(n, dtype=bool).view(np.uint8)
     */
      __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Unrecognized_operator); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__6);
      __Pyx_GIVEREF(__pyx_tuple__6);

     641:

     642:     result = np.empty(n, dtype=bool).view(np.uint8)

      /* "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(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __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, __pyx_t_1, __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(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__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, __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(__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;

     643:

     644:     if flag == cpython.Py_NE:

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

     645:         for i in range(n):

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

     646:             x = left[i]

          /* "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_SET(__pyx_v_x, __pyx_t_1);
          __pyx_t_1 = 0;

     647:             y = right[i]

          /* "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_SET(__pyx_v_y, __pyx_t_1);
          __pyx_t_1 = 0;

     648:

     649:             if _checknull(x) or _checknull(y):

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

     650:                 result[i] = True

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

     651:             else:

     652:                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)

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

     653:     else:

     654:         for i in range(n):

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

     655:             x = left[i]

          /* "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_SET(__pyx_v_x, __pyx_t_1);
          __pyx_t_1 = 0;

     656:             y = right[i]

          /* "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_SET(__pyx_v_y, __pyx_t_1);
          __pyx_t_1 = 0;

     657:

     658:             if _checknull(x) or _checknull(y):

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

     659:                 result[i] = False

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

     660:             else:

     661:                 result[i] = cpython.PyObject_RichCompareBool(x, y, flag)

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

     662:

     663:     return result.view(bool)

      /* "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, __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(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     664:

     665:

     666: @cython.wraparound(False)

     667: @cython.boundscheck(False)

     668: def scalar_binop(ndarray[object] values, object val, object op):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* function exit code */
      __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;
    }

      /* "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_tuple__100 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_op, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_x); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__100);
      __Pyx_GIVEREF(__pyx_tuple__100);

      /* "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_pandas_lib); 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;
      __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_scalar_binop, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     669:     cdef:

     670:         Py_ssize_t i, n = len(values)

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

     671:         ndarray[object] result

     672:         object x

     673:

     674:     result = np.empty(n, dtype=object)

      /* "pandas/lib.pyx":674
     *         object x
     *
     *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
     *     if util._checknull(val):
     *         result.fill(val)
     */
      __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(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __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, __pyx_t_4, __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(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__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;

     675:     if util._checknull(val):

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

     676:         result.fill(val)

        /* "pandas/lib.pyx":676
     *     result = np.empty(n, dtype=object)
     *     if util._checknull(val):
     *         result.fill(val)             # <<<<<<<<<<<<<<
     *         return result
     *
     */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     677:         return result

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

     678:

     679:     for i in range(n):

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

     680:         x = values[i]

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

     681:         if util._checknull(x):

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

     682:             result[i] = x

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

     683:         else:

     684:             result[i] = op(x, val)

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

     685:

     686:     return maybe_convert_bool(result)

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

     687:

     688: @cython.wraparound(False)

     689: @cython.boundscheck(False)

     690: def vec_binop(ndarray[object] left, ndarray[object] right, object op):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __Pyx_RefNannySetupContext("vec_binop", 0);
      __pyx_pybuffer_result.pybuffer.buf = NULL;
      __pyx_pybuffer_result.refcount = 0;
      __pyx_pybuffernd_result.data = NULL;
      __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
      __pyx_pybuffer_left.pybuffer.buf = NULL;
      __pyx_pybuffer_left.refcount = 0;
      __pyx_pybuffernd_left.data = NULL;
      __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
      __pyx_pybuffer_right.pybuffer.buf = NULL;
      __pyx_pybuffer_right.refcount = 0;
      __pyx_pybuffernd_right.data = NULL;
      __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":690
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def vec_binop(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(left)
     */
      __pyx_tuple__102 = PyTuple_Pack(8, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_op, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__102);
      __Pyx_GIVEREF(__pyx_tuple__102);

      /* "pandas/lib.pyx":690
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def vec_binop(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(left)
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_61vec_binop, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_vec_binop, 690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     691:     cdef:

     692:         Py_ssize_t i, n = len(left)

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

     693:         ndarray[object] result

     694:

     695:     if n != len(right):

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

     696:         raise ValueError('Arrays were different lengths: %d vs %d'

        /* "pandas/lib.pyx":696
     *
     *     if n != len(right):
     *         raise ValueError('Arrays were different lengths: %d vs %d'             # <<<<<<<<<<<<<<
     *                          % (n, len(right)))
     *
     */
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

     697:                          % (n, len(right)))

        /* "pandas/lib.pyx":697
     *     if n != len(right):
     *         raise ValueError('Arrays were different lengths: %d vs %d'
     *                          % (n, len(right)))             # <<<<<<<<<<<<<<
     *
     *     result = np.empty(n, dtype=object)
     */
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Arrays_were_different_lengths_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     698:

     699:     result = np.empty(n, dtype=object)

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

     700:

     701:     for i in range(n):

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

     702:         x = left[i]

        /* "pandas/lib.pyx":702
     *
     *     for i in range(n):
     *         x = left[i]             # <<<<<<<<<<<<<<
     *         y = right[i]
     *         try:
     */
        __pyx_t_13 = __pyx_v_i;
        __pyx_t_6 = (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_SET(__pyx_v_x, __pyx_t_6);
        __pyx_t_6 = 0;

     703:         y = right[i]

        /* "pandas/lib.pyx":703
     *     for i in range(n):
     *         x = left[i]
     *         y = right[i]             # <<<<<<<<<<<<<<
     *         try:
     *             result[i] = op(x, y)
     */
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_6 = (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_SET(__pyx_v_y, __pyx_t_6);
        __pyx_t_6 = 0;

     704:         try:

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

     705:             result[i] = op(x, y)

            /* "pandas/lib.pyx":705
     *         y = right[i]
     *         try:
     *             result[i] = op(x, y)             # <<<<<<<<<<<<<<
     *         except TypeError:
     *             if util._checknull(x):
     */
            __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_v_x);
            PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x);
            __Pyx_GIVEREF(__pyx_v_x);
            __Pyx_INCREF(__pyx_v_y);
            PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_y);
            __Pyx_GIVEREF(__pyx_v_y);
            __pyx_t_4 = PyObject_Call(__pyx_v_op, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__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;

     706:         except TypeError:

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

     707:             if util._checknull(x):

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

     708:                 result[i] = x

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

     709:             elif util._checknull(y):

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

     710:                 result[i] = y

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

     711:             else:

     712:                 raise

              /* "pandas/lib.pyx":712
     *                 result[i] = y
     *             else:
     *                 raise             # <<<<<<<<<<<<<<
     *
     *     return maybe_convert_bool(result)
     */
              __Pyx_GIVEREF(__pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_6);
              __Pyx_XGIVEREF(__pyx_t_3);
              __Pyx_ErrRestore(__pyx_t_4, __pyx_t_6, __pyx_t_3);
              __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0;
              {__pyx_filename = __pyx_f[2]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
            }
            __pyx_L16:;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L7_exception_handled;
          }
          goto __pyx_L8_except_error;
          __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:;
        }
      }

     713:

     714:     return maybe_convert_bool(result)

      /* "pandas/lib.pyx":714
     *                 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 = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(((PyObject *)__pyx_v_result));
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
      __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     715:

     716:

     717: def astype_intsafe(ndarray[object] arr, new_dtype):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

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

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

      /* "pandas/lib.pyx":717
     *
     *
     * def astype_intsafe(ndarray[object] arr, new_dtype):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(arr)
     */
      __pyx_tuple__104 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_new_dtype, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v, __pyx_n_s_is_datelike, __pyx_n_s_result); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__104);
      __Pyx_GIVEREF(__pyx_tuple__104);

      /* "pandas/lib.pyx":717
     *
     *
     * def astype_intsafe(ndarray[object] arr, new_dtype):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(arr)
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_63astype_intsafe, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_astype_intsafe, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_astype_intsafe, 717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     718:     cdef:

     719:         Py_ssize_t i, n = len(arr)

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

     720:         object v

     721:         bint is_datelike

     722:         ndarray result

     723:

     724:     # on 32-bit, 1.6.2 numpy M8[ns] is a subdtype of integer, which is weird

     725:     is_datelike = new_dtype in ['M8[ns]','m8[ns]']

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

     726:

     727:     result = np.empty(n, dtype=new_dtype)

      /* "pandas/lib.pyx":727
     *     is_datelike = new_dtype in ['M8[ns]','m8[ns]']
     *
     *     result = np.empty(n, dtype=new_dtype)             # <<<<<<<<<<<<<<
     *     for i in range(n):
     *         v = arr[i]
     */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_new_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
      __pyx_t_8 = 0;

     728:     for i in range(n):

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

     729:         v = arr[i]

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

     730:         if is_datelike and checknull(v):

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

     731:            result[i] = NPY_NAT

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

     732:         else:

     733:            util.set_value_at(result, i, v)

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

     734:

     735:     return result

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

     736:

     737: cpdef ndarray[object] astype_str(ndarray arr):

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

    static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
    static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      PyArrayObject *__pyx_v_result = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
      __Pyx_Buffer __pyx_pybuffer_result;
      PyArrayObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("astype_str", 0);
      __pyx_pybuffer_result.pybuffer.buf = NULL;
      __pyx_pybuffer_result.refcount = 0;
      __pyx_pybuffernd_result.data = NULL;
      __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

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

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("astype_str", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_3lib_astype_str(__pyx_v_arr, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pandas.lib.astype_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     738:     cdef:

     739:         Py_ssize_t i, n = arr.size

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

     740:         ndarray[object] result = np.empty(n, dtype=object)

      /* "pandas/lib.pyx":740
     *     cdef:
     *         Py_ssize_t i, n = arr.size
     *         ndarray[object] result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
     *
     *     for i in range(n):
     */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
        }
      }
      __pyx_t_6 = 0;
      __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;

     741:

     742:     for i in range(n):

      /* "pandas/lib.pyx":742
     *         ndarray[object] result = np.empty(n, dtype=object)
     *
     *     for i in range(n):             # <<<<<<<<<<<<<<
     *         util.set_value_at(result, i, str(arr[i]))
     *
     */
      __pyx_t_2 = __pyx_v_n;
      for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) {
        __pyx_v_i = __pyx_t_7;

     743:         util.set_value_at(result, i, str(arr[i]))

        /* "pandas/lib.pyx":743
     *
     *     for i in range(n):
     *         util.set_value_at(result, i, str(arr[i]))             # <<<<<<<<<<<<<<
     *
     *     return result
     */
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr), __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __pyx_f_4util_set_value_at(((PyArrayObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }

     744:

     745:     return result

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

     746:

     747: def clean_index_list(list obj):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
      PyArrayObject *__pyx_v_converted = 0;
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      PyObject *__pyx_v_v = 0;
      int __pyx_v_all_arrays;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_converted;
      __Pyx_Buffer __pyx_pybuffer_converted;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __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":747
     *     return result
     *
     * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
     *     '''
     *     Utility used in pandas.core.index._ensure_index
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":747
     *     return result
     *
     * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
     *     '''
     *     Utility used in pandas.core.index._ensure_index
     */
      __pyx_tuple__106 = PyTuple_Pack(6, __pyx_n_s_obj, __pyx_n_s_converted, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v, __pyx_n_s_all_arrays); if (unlikely(!__pyx_tuple__106)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__106);
      __Pyx_GIVEREF(__pyx_tuple__106);

      /* "pandas/lib.pyx":747
     *     return result
     *
     * def clean_index_list(list obj):             # <<<<<<<<<<<<<<
     *     '''
     *     Utility used in pandas.core.index._ensure_index
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_67clean_index_list, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_clean_index_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_clean_index_list, 747, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     748:     '''

     749:     Utility used in pandas.core.index._ensure_index

     750:     '''

     751:     cdef:

     752:         ndarray[object] converted

     753:         Py_ssize_t i, n = len(obj)

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

     754:         object v

     755:         bint all_arrays = 1

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

     756:

     757:     for i in range(n):

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

     758:         v = obj[i]

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

     759:         if not (PyList_Check(v) or np.PyArray_Check(v)):

        /* "pandas/lib.pyx":759
     *     for i in range(n):
     *         v = obj[i]
     *         if not (PyList_Check(v) or np.PyArray_Check(v)):             # <<<<<<<<<<<<<<
     *             all_arrays = 0
     *             break
     */
        __pyx_t_4 = (PyList_Check(__pyx_v_v) != 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) {

     760:             all_arrays = 0

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

     761:             break

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

     762:

     763:     if all_arrays:

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

     764:         return obj, all_arrays

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

     765:

     766:     converted = np.empty(n, dtype=object)

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

     767:     for i in range(n):

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

     768:         v = obj[i]

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

     769:         if PyList_Check(v) or np.PyArray_Check(v):

        /* "pandas/lib.pyx":769
     *     for i in range(n):
     *         v = obj[i]
     *         if PyList_Check(v) or np.PyArray_Check(v):             # <<<<<<<<<<<<<<
     *             converted[i] = tuple(v)
     *         else:
     */
        __pyx_t_4 = (PyList_Check(__pyx_v_v) != 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) {

     770:             converted[i] = tuple(v)

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

     771:         else:

     772:             converted[i] = v

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

     773:

     774:     return maybe_convert_objects(converted), 0

      /* "pandas/lib.pyx":774
     *             converted[i] = v
     *
     *     return maybe_convert_objects(converted), 0             # <<<<<<<<<<<<<<
     *
     * @cython.boundscheck(False)
     */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(((PyObject *)__pyx_v_converted));
      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_converted));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_converted));
      __pyx_t_8 = PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      __pyx_t_8 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L0;

     775:

     776: @cython.boundscheck(False)

     777: @cython.wraparound(False)

     778: def max_len_string_array(ndarray[object, ndim=1] arr):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":778
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def max_len_string_array(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
     *     """ return the maximum size of elements in a 1-dim string array """
     *     cdef:
     */
      __pyx_tuple__108 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_length, __pyx_n_s_v); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__108);
      __Pyx_GIVEREF(__pyx_tuple__108);

      /* "pandas/lib.pyx":778
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def max_len_string_array(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
     *     """ return the maximum size of elements in a 1-dim string array """
     *     cdef:
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_69max_len_string_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_max_len_string_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_max_len_string_array, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     779:     """ return the maximum size of elements in a 1-dim string array """

     780:     cdef:

     781:         int i, m, l

     782:         length = arr.shape[0]

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

     783:         object v

     784:

     785:     m = 0

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

     786:     for i from 0 <= i < length:

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

     787:         v = arr[i]

        /* "pandas/lib.pyx":787
     *     m = 0
     *     for i from 0 <= i < length:
     *         v = arr[i]             # <<<<<<<<<<<<<<
     *         if PyString_Check(v) or PyBytes_Check(v):
     *             l = len(v)
     */
        __pyx_t_3 = __pyx_v_i;
        __pyx_t_1 = (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_SET(__pyx_v_v, __pyx_t_1);
        __pyx_t_1 = 0;

     788:         if PyString_Check(v) or PyBytes_Check(v):

        /* "pandas/lib.pyx":788
     *     for i from 0 <= i < length:
     *         v = arr[i]
     *         if PyString_Check(v) or PyBytes_Check(v):             # <<<<<<<<<<<<<<
     *             l = len(v)
     *
     */
        __pyx_t_4 = (PyString_Check(__pyx_v_v) != 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) {

     789:             l = len(v)

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

     790:

     791:             if l > m:

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

     792:                 m = l

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

     793:

     794:     return m

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

     795:

     796: @cython.boundscheck(False)

     797: @cython.wraparound(False)

     798: def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):

    /* "pandas/lib.pyx":798
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
     *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
     *
     */

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static char __pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep[] = " replace the values in the array with replacement if they are nan_rep; return the same array ";
    static PyMethodDef __pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep = {__Pyx_NAMESTR("string_array_replace_from_nan_rep"), (PyCFunction)__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep)};
    static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyArrayObject *__pyx_v_arr = 0;
      PyObject *__pyx_v_nan_rep = 0;
      PyObject *__pyx_v_replace = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_nan_rep,&__pyx_n_s_replace,0};
        PyObject* values[3] = {0,0,0};
        values[2] = ((PyObject *)Py_None);
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nan_rep)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            case  2:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_replace);
              if (value) { values[2] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "string_array_replace_from_nan_rep") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_arr = ((PyArrayObject *)values[0]);
        __pyx_v_nan_rep = values[1];
        __pyx_v_replace = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_L3_error:;
      __Pyx_AddTraceback("pandas.lib.string_array_replace_from_nan_rep", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = __pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(__pyx_self, __pyx_v_arr, __pyx_v_nan_rep, __pyx_v_replace);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "pandas/lib.pyx":798
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
     *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
     *
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":798
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
     *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
     *
     */
      __pyx_tuple__110 = PyTuple_Pack(5, __pyx_n_s_arr, __pyx_n_s_nan_rep, __pyx_n_s_replace, __pyx_n_s_length, __pyx_n_s_i); if (unlikely(!__pyx_tuple__110)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__110);
      __Pyx_GIVEREF(__pyx_tuple__110);

      /* "pandas/lib.pyx":798
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None):             # <<<<<<<<<<<<<<
     *     """ replace the values in the array with replacement if they are nan_rep; return the same array """
     *
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_array_replace_from_nan_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_string_array_replace_from_nan_re, 798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     799:     """ replace the values in the array with replacement if they are nan_rep; return the same array """

     800:

     801:     cdef int length = arr.shape[0], i = 0

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

     802:     if replace is None:

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

     803:         replace = np.nan

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

     804:

     805:     for i from 0 <= i < length:

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

     806:         if arr[i] == nan_rep:

        /* "pandas/lib.pyx":806
     *
     *     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 = 806; __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 = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_2) {

     807:             arr[i] = replace

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

     808:

     809:     return arr

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

     810:

     811: @cython.boundscheck(False)

     812: @cython.wraparound(False)

     813: def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer) {
      int __pyx_v_N;
      int __pyx_v_j;
      int __pyx_v_i;
      int __pyx_v_ncols;
      PyObject *__pyx_v_rows = 0;
      PyObject *__pyx_v_row = NULL;
      CYTHON_UNUSED int __pyx_v_x;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("write_csv_rows", 0);

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":813
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer):             # <<<<<<<<<<<<<<
     *
     *     cdef int N, j, i, ncols
     */
      __pyx_tuple__112 = PyTuple_Pack(13, __pyx_n_s_data, __pyx_n_s_data_index, __pyx_n_s_nlevels, __pyx_n_s_cols, __pyx_n_s_writer, __pyx_n_s_N, __pyx_n_s_j, __pyx_n_s_i, __pyx_n_s_ncols, __pyx_n_s_rows, __pyx_n_s_val, __pyx_n_s_row, __pyx_n_s_x); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__112);
      __Pyx_GIVEREF(__pyx_tuple__112);

      /* "pandas/lib.pyx":813
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer):             # <<<<<<<<<<<<<<
     *
     *     cdef int N, j, i, ncols
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_73write_csv_rows, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_write_csv_rows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_write_csv_rows, 813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     814:

     815:     cdef int N, j, i, ncols

     816:     cdef list rows

     817:     cdef object val

     818:

     819:     # In crude testing, N>100 yields little marginal improvement

     820:     N=100

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

     821:

     822:     # pre-allocate  rows

     823:     ncols = len(cols)

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

     824:     rows = [[None]*(nlevels+ncols) for x in range(N)]

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

     825:

     826:     j = -1

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

     827:     if nlevels == 1:

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

     828:         for j in range(len(data_index)):

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

     829:             row = rows[j % N]

          /* "pandas/lib.pyx":829
     *     if nlevels == 1:
     *         for j in range(len(data_index)):
     *             row = rows[j % N]             # <<<<<<<<<<<<<<
     *             row[0] = data_index[j]
     *             for i in range(ncols):
     */
          if (unlikely(__pyx_v_N == 0)) {
            #ifdef WITH_THREAD
            PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
            #endif
            PyErr_SetString(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_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_SET(__pyx_v_row, __pyx_t_2);
          __pyx_t_2 = 0;

     830:             row[0] = data_index[j]

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

     831:             for i in range(ncols):

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

     832:                 row[1+i] = data[i][j]

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

     833:

     834:             if j >= N-1 and j % N == N-1:

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

     835:                 writer.writerows(rows)

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

     836:     elif nlevels > 1:

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

     837:         for j in range(len(data_index)):

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

     838:             row = rows[j % N]

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

     839:             row[:nlevels] = list(data_index[j])

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

     840:             for i in range(ncols):

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

     841:                 row[nlevels+i] = data[i][j]

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

     842:

     843:             if j >= N-1 and j % N == N-1:

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

     844:                 writer.writerows(rows)

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

     845:     else:

     846:         for j in range(len(data_index)):

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

     847:             row = rows[j % N]

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

     848:             for i in range(ncols):

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

     849:                 row[i] = data[i][j]

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

     850:

     851:             if j >= N-1 and j % N == N-1:

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

     852:                 writer.writerows(rows)

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

     853:

     854:     if  j >= 0 and (j < N-1 or (j % N) != N-1 ):

      /* "pandas/lib.pyx":854
     *                 writer.writerows(rows)
     *
     *     if  j >= 0 and (j < N-1 or (j % N) != N-1 ):             # <<<<<<<<<<<<<<
     *         writer.writerows(rows[:((j+1) % N)])
     *
     */
      __pyx_t_6 = ((__pyx_v_j >= 0) != 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_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
            #ifdef WITH_THREAD
            PyGILState_Release(__pyx_gilstate_save);
            #endif
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) != (__pyx_v_N - 1)) != 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) {

     855:         writer.writerows(rows[:((j+1) % N)])

        /* "pandas/lib.pyx":855
     *
     *     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 = 855; __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_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
          #ifdef WITH_THREAD
          PyGILState_Release(__pyx_gilstate_save);
          #endif
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_11 = __Pyx_PyList_GetSlice(__pyx_v_rows, 0, __Pyx_mod_long(__pyx_t_8, __pyx_v_N)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = PyTuple_New(1); 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);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L21;
      }
      __pyx_L21:;

     856:

     857: #-------------------------------------------------------------------------------

     858: # Groupby-related functions

     859:

     860: @cython.boundscheck(False)

     861: def arrmap(ndarray[object] index, object func):

    /* "pandas/lib.pyx":861
     *
     * @cython.boundscheck(False)
     * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
     *     cdef int length = index.shape[0]
     *     cdef int i = 0
     */

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_74arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
      int __pyx_v_length;
      int __pyx_v_i;
      PyArrayObject *__pyx_v_result = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
      __Pyx_Buffer __pyx_pybuffer_index;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
      __Pyx_Buffer __pyx_pybuffer_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("arrmap", 0);
      __pyx_pybuffer_result.pybuffer.buf = NULL;
      __pyx_pybuffer_result.refcount = 0;
      __pyx_pybuffernd_result.data = NULL;
      __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
      __pyx_pybuffer_index.pybuffer.buf = NULL;
      __pyx_pybuffer_index.refcount = 0;
      __pyx_pybuffernd_index.data = NULL;
      __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

      /* "pandas/lib.pyx":861
     *
     * @cython.boundscheck(False)
     * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
     *     cdef int length = index.shape[0]
     *     cdef int i = 0
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":861
     *
     * @cython.boundscheck(False)
     * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
     *     cdef int length = index.shape[0]
     *     cdef int i = 0
     */
      __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__114);
      __Pyx_GIVEREF(__pyx_tuple__114);

      /* "pandas/lib.pyx":861
     *
     * @cython.boundscheck(False)
     * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
     *     cdef int length = index.shape[0]
     *     cdef int i = 0
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_75arrmap, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_arrmap, 861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     862:     cdef int length = index.shape[0]

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

     863:     cdef int i = 0

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

     864:

     865:     cdef ndarray[object] result = np.empty(length, dtype=np.object_)

      /* "pandas/lib.pyx":865
     *     cdef int i = 0
     *
     *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
     *
     *     for i from 0 <= i < length:
     */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
        }
      }
      __pyx_t_6 = 0;
      __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;

     866:

     867:     for i from 0 <= i < length:

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

     868:         result[i] = func(index[i])

        /* "pandas/lib.pyx":868
     *
     *     for i from 0 <= i < length:
     *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
     *
     *     return result
     */
        __pyx_t_8 = __pyx_v_i;
        if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_pybuffernd_index.diminfo[0].shape;
        __pyx_t_5 = (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 = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_v_func, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__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;
      }

     869:

     870:     return result

      /* "pandas/lib.pyx":870
     *         result[i] = func(index[i])
     *
     *     return result             # <<<<<<<<<<<<<<
     *
     * @cython.wraparound(False)
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_result));
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

     871:

     872: @cython.wraparound(False)

     873: @cython.boundscheck(False)

     874: def is_lexsorted(list list_of_arrays):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) {
      int __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      Py_ssize_t __pyx_v_nlevels;
      __pyx_t_5numpy_int64_t __pyx_v_k;
      __pyx_t_5numpy_int64_t __pyx_v_cur;
      __pyx_t_5numpy_int64_t __pyx_v_pre;
      PyArrayObject *__pyx_v_arr = 0;
      __pyx_t_5numpy_int64_t **__pyx_v_vecs;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_lexsorted", 0);

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":874
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
     *     cdef:
     *         int i
     */
      __pyx_tuple__116 = PyTuple_Pack(9, __pyx_n_s_list_of_arrays, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_nlevels, __pyx_n_s_k, __pyx_n_s_cur, __pyx_n_s_pre, __pyx_n_s_arr, __pyx_n_s_vecs); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__116);
      __Pyx_GIVEREF(__pyx_tuple__116);

      /* "pandas/lib.pyx":874
     * @cython.wraparound(False)
     * @cython.boundscheck(False)
     * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
     *     cdef:
     *         int i
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_77is_lexsorted, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_lexsorted, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_is_lexsorted, 874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     875:     cdef:

     876:         int i

     877:         Py_ssize_t n, nlevels

     878:         int64_t k, cur, pre

     879:         ndarray arr

     880:

     881:     nlevels = len(list_of_arrays)

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

     882:     n = len(list_of_arrays[0])

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

     883:

     884:     cdef int64_t **vecs = <int64_t**> malloc(nlevels * sizeof(int64_t*))

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

     885:     for i from 0 <= i < nlevels:

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

     886:         # vecs[i] = <int64_t *> (<ndarray> list_of_arrays[i]).data

     887:

     888:         arr = list_of_arrays[i]

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

     889:         vecs[i] = <int64_t *> arr.data

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

     890:     # assume uniqueness??

     891:

     892:     for i from 1 <= i < n:

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

     893:         for k from 0 <= k < nlevels:

        /* "pandas/lib.pyx":893
     *
     *     for i from 1 <= i < n:
     *         for k from 0 <= k < nlevels:             # <<<<<<<<<<<<<<
     *             cur = vecs[k][i]
     *             pre = vecs[k][i-1]
     */
        __pyx_t_3 = __pyx_v_nlevels;
        for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {

     894:             cur = vecs[k][i]

          /* "pandas/lib.pyx":894
     *     for i from 1 <= i < n:
     *         for k from 0 <= k < nlevels:
     *             cur = vecs[k][i]             # <<<<<<<<<<<<<<
     *             pre = vecs[k][i-1]
     *             if cur == pre:
     */
          __pyx_v_cur = ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_i]);

     895:             pre = vecs[k][i-1]

          /* "pandas/lib.pyx":895
     *         for k from 0 <= k < nlevels:
     *             cur = vecs[k][i]
     *             pre = vecs[k][i-1]             # <<<<<<<<<<<<<<
     *             if cur == pre:
     *                 continue
     */
          __pyx_v_pre = ((__pyx_v_vecs[__pyx_v_k])[(__pyx_v_i - 1)]);

     896:             if cur == pre:

          /* "pandas/lib.pyx":896
     *             cur = vecs[k][i]
     *             pre = vecs[k][i-1]
     *             if cur == pre:             # <<<<<<<<<<<<<<
     *                 continue
     *             elif cur > pre:
     */
          __pyx_t_4 = ((__pyx_v_cur == __pyx_v_pre) != 0);
          if (__pyx_t_4) {

     897:                 continue

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

     898:             elif cur > pre:

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

     899:                 break

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

     900:             else:

     901:                 return False

            /* "pandas/lib.pyx":901
     *                 break
     *             else:
     *                 return False             # <<<<<<<<<<<<<<
     *     free(vecs)
     *     return True
     */
            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(Py_False);
            __pyx_r = Py_False;
            goto __pyx_L0;
          }
          __pyx_L7_continue:;
        }
        __pyx_L8_break:;
      }

     902:     free(vecs)

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

     903:     return True

      /* "pandas/lib.pyx":903
     *                 return False
     *     free(vecs)
     *     return True             # <<<<<<<<<<<<<<
     *
     *
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

     904:

     905:

     906:

     907: # TODO: could do even better if we know something about the data. eg, index has

     908: # 1-min data, binner has 5-min data, then  bins are just strides in index. This

     909: # is a general, O(max(len(values), len(binner))) method.

     910:

     911: @cython.boundscheck(False)

     912: @cython.wraparound(False)

     913: def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed) {
      Py_ssize_t __pyx_v_lenidx;
      Py_ssize_t __pyx_v_lenbin;
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_j;
      Py_ssize_t __pyx_v_bc;
      PyArrayObject *__pyx_v_bins = 0;
      CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_l_bin;
      __pyx_t_5numpy_int64_t __pyx_v_r_bin;
      int __pyx_v_right_closed;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_binner;
      __Pyx_Buffer __pyx_pybuffer_binner;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_bins;
      __Pyx_Buffer __pyx_pybuffer_bins;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
      __Pyx_Buffer __pyx_pybuffer_values;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("generate_bins_dt64", 0);
      __pyx_pybuffer_bins.pybuffer.buf = NULL;
      __pyx_pybuffer_bins.refcount = 0;
      __pyx_pybuffernd_bins.data = NULL;
      __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins;
      __pyx_pybuffer_values.pybuffer.buf = NULL;
      __pyx_pybuffer_values.refcount = 0;
      __pyx_pybuffernd_values.data = NULL;
      __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
      __pyx_pybuffer_binner.pybuffer.buf = NULL;
      __pyx_pybuffer_binner.refcount = 0;
      __pyx_pybuffernd_binner.data = NULL;
      __pyx_pybuffernd_binner.rcbuffer = &__pyx_pybuffer_binner;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_binner.rcbuffer->pybuffer, (PyObject*)__pyx_v_binner, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_binner.diminfo[0].strides = __pyx_pybuffernd_binner.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_binner.diminfo[0].shape = __pyx_pybuffernd_binner.rcbuffer->pybuffer.shape[0];

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":913
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,             # <<<<<<<<<<<<<<
     *                        object closed='left'):
     *     """
     */
      __pyx_tuple__118 = PyTuple_Pack(13, __pyx_n_s_values, __pyx_n_s_binner, __pyx_n_s_closed, __pyx_n_s_lenidx, __pyx_n_s_lenbin, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_bc, __pyx_n_s_vc, __pyx_n_s_bins, __pyx_n_s_l_bin, __pyx_n_s_r_bin, __pyx_n_s_right_closed); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__118);
      __Pyx_GIVEREF(__pyx_tuple__118);

      /* "pandas/lib.pyx":913
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner,             # <<<<<<<<<<<<<<
     *                        object closed='left'):
     *     """
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_79generate_bins_dt64, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_bins_dt64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_generate_bins_dt64, 913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     914:                        object closed='left'):

     915:     """

     916:     Int64 (datetime64) version of generic python version in groupby.py

     917:     """

     918:     cdef:

     919:         Py_ssize_t lenidx, lenbin, i, j, bc, vc

     920:         ndarray[int64_t] bins

     921:         int64_t l_bin, r_bin

     922:         bint right_closed = closed == 'right'

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

     923:

     924:     lenidx = len(values)

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

     925:     lenbin = len(binner)

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

     926:

     927:     if lenidx <= 0 or lenbin <= 0:

      /* "pandas/lib.pyx":927
     *     lenbin = len(binner)
     *
     *     if lenidx <= 0 or lenbin <= 0:             # <<<<<<<<<<<<<<
     *         raise ValueError("Invalid length for values or for binner")
     *
     */
      __pyx_t_2 = ((__pyx_v_lenidx <= 0) != 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) {

     928:         raise ValueError("Invalid length for values or for binner")

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

      /* "pandas/lib.pyx":928
     *
     *     if lenidx <= 0 or lenbin <= 0:
     *         raise ValueError("Invalid length for values or for binner")             # <<<<<<<<<<<<<<
     *
     *     # check binner fits data
     */
      __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Invalid_length_for_values_or_for); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__7);
      __Pyx_GIVEREF(__pyx_tuple__7);

     929:

     930:     # check binner fits data

     931:     if values[0] < binner[0]:

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

     932:         raise ValueError("Values falls before first bin")

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

      /* "pandas/lib.pyx":932
     *     # check binner fits data
     *     if values[0] < binner[0]:
     *         raise ValueError("Values falls before first bin")             # <<<<<<<<<<<<<<
     *
     *     if values[lenidx-1] > binner[lenbin-1]:
     */
      __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Values_falls_before_first_bin); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__8);
      __Pyx_GIVEREF(__pyx_tuple__8);

     933:

     934:     if values[lenidx-1] > binner[lenbin-1]:

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

     935:         raise ValueError("Values falls after last bin")

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

      /* "pandas/lib.pyx":935
     *
     *     if values[lenidx-1] > binner[lenbin-1]:
     *         raise ValueError("Values falls after last bin")             # <<<<<<<<<<<<<<
     *
     *     bins   = np.empty(lenbin - 1, dtype=np.int64)
     */
      __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Values_falls_after_last_bin); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__9);
      __Pyx_GIVEREF(__pyx_tuple__9);

     936:

     937:     bins   = np.empty(lenbin - 1, dtype=np.int64)

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

     938:

     939:     j  = 0 # index into values

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

     940:     bc = 0 # bin count

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

     941:

     942:     # linear scan

     943:     for i in range(0, lenbin - 1):

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

     944:         l_bin = binner[i]

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

     945:         r_bin = binner[i+1]

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

     946:

     947:         # count values in current bin, advance to next bin

     948:         while j < lenidx and (values[j] < r_bin or

        /* "pandas/lib.pyx":948
     *
     *         # count values in current bin, advance to next bin
     *         while j < lenidx and (values[j] < r_bin or             # <<<<<<<<<<<<<<
     *                               (right_closed and values[j] == r_bin)):
     *             j += 1
     */
        while (1) {
          __pyx_t_5 = ((__pyx_v_j < __pyx_v_lenidx) != 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) {

     949:                               (right_closed and values[j] == r_bin)):

              /* "pandas/lib.pyx":949
     *         # count values in current bin, advance to next bin
     *         while j < lenidx and (values[j] < r_bin or
     *                               (right_closed and values[j] == r_bin)):             # <<<<<<<<<<<<<<
     *             j += 1
     *
     */
              if ((__pyx_v_right_closed != 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;

     950:             j += 1

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

     951:

     952:         bins[bc] = j

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

     953:         bc += 1

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

     954:

     955:     return bins

      /* "pandas/lib.pyx":955
     *         bc += 1
     *
     *     return bins             # <<<<<<<<<<<<<<
     *
     *
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_bins));
      __pyx_r = ((PyObject *)__pyx_v_bins);
      goto __pyx_L0;

     956:

     957:

     958:

     959:

     960: @cython.boundscheck(False)

     961: @cython.wraparound(False)

     962: def row_bool_subset(ndarray[float64_t, ndim=2] values,

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_j;
      Py_ssize_t __pyx_v_n;
      Py_ssize_t __pyx_v_k;
      Py_ssize_t __pyx_v_pos;
      PyArrayObject *__pyx_v_out = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
      __Pyx_Buffer __pyx_pybuffer_mask;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
      __Pyx_Buffer __pyx_pybuffer_out;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
      __Pyx_Buffer __pyx_pybuffer_values;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("row_bool_subset", 0);
      __pyx_pybuffer_out.pybuffer.buf = NULL;
      __pyx_pybuffer_out.refcount = 0;
      __pyx_pybuffernd_out.data = NULL;
      __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
      __pyx_pybuffer_values.pybuffer.buf = NULL;
      __pyx_pybuffer_values.refcount = 0;
      __pyx_pybuffernd_values.data = NULL;
      __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
      __pyx_pybuffer_mask.pybuffer.buf = NULL;
      __pyx_pybuffer_mask.refcount = 0;
      __pyx_pybuffernd_mask.data = NULL;
      __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":962
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def row_bool_subset(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
     *                     ndarray[uint8_t, cast=True] mask):
     *     cdef:
     */
      __pyx_tuple__120 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_pos, __pyx_n_s_out); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__120);
      __Pyx_GIVEREF(__pyx_tuple__120);

      /* "pandas/lib.pyx":962
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def row_bool_subset(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
     *                     ndarray[uint8_t, cast=True] mask):
     *     cdef:
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_81row_bool_subset, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_row_bool_subset, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_row_bool_subset, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     963:                     ndarray[uint8_t, cast=True] mask):

     964:     cdef:

     965:         Py_ssize_t i, j, n, k, pos = 0

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

     966:         ndarray[float64_t, ndim=2] out

     967:

     968:     n, k = (<object> values).shape

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

     969:     assert(n == len(mask))

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

     970:

     971:     out = np.empty((mask.sum(), k), dtype=np.float64)

      /* "pandas/lib.pyx":971
     *     assert(n == len(mask))
     *
     *     out = np.empty((mask.sum(), k), dtype=np.float64)             # <<<<<<<<<<<<<<
     *
     *     for i in range(n):
     */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_2 = 0;
      __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __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 = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_10 < 0)) {
          PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          }
        }
        __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_9 = 0;
      __pyx_v_out = ((PyArrayObject *)__pyx_t_8);
      __pyx_t_8 = 0;

     972:

     973:     for i in range(n):

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

     974:         if mask[i]:

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

     975:             for j in range(k):

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

     976:                 out[pos, j] = values[i, j]

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

     977:             pos += 1

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

     978:

     979:     return out

      /* "pandas/lib.pyx":979
     *             pos += 1
     *
     *     return out             # <<<<<<<<<<<<<<
     *
     * @cython.boundscheck(False)
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_out));
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

     980:

     981: @cython.boundscheck(False)

     982: @cython.wraparound(False)

     983: def row_bool_subset_object(ndarray[object, ndim=2] values,

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_j;
      Py_ssize_t __pyx_v_n;
      Py_ssize_t __pyx_v_k;
      Py_ssize_t __pyx_v_pos;
      PyArrayObject *__pyx_v_out = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
      __Pyx_Buffer __pyx_pybuffer_mask;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
      __Pyx_Buffer __pyx_pybuffer_out;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
      __Pyx_Buffer __pyx_pybuffer_values;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("row_bool_subset_object", 0);
      __pyx_pybuffer_out.pybuffer.buf = NULL;
      __pyx_pybuffer_out.refcount = 0;
      __pyx_pybuffernd_out.data = NULL;
      __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
      __pyx_pybuffer_values.pybuffer.buf = NULL;
      __pyx_pybuffer_values.refcount = 0;
      __pyx_pybuffernd_values.data = NULL;
      __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
      __pyx_pybuffer_mask.pybuffer.buf = NULL;
      __pyx_pybuffer_mask.refcount = 0;
      __pyx_pybuffernd_mask.data = NULL;
      __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":983
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def row_bool_subset_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
     *                            ndarray[uint8_t, cast=True] mask):
     *     cdef:
     */
      __pyx_tuple__122 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_pos, __pyx_n_s_out); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__122);
      __Pyx_GIVEREF(__pyx_tuple__122);

      /* "pandas/lib.pyx":983
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def row_bool_subset_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
     *                            ndarray[uint8_t, cast=True] mask):
     *     cdef:
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_83row_bool_subset_object, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_row_bool_subset_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_row_bool_subset_object, 983, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     984:                            ndarray[uint8_t, cast=True] mask):

     985:     cdef:

     986:         Py_ssize_t i, j, n, k, pos = 0

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

     987:         ndarray[object, ndim=2] out

     988:

     989:     n, k = (<object> values).shape

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

     990:     assert(n == len(mask))

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

     991:

     992:     out = np.empty((mask.sum(), k), dtype=object)

      /* "pandas/lib.pyx":992
     *     assert(n == len(mask))
     *
     *     out = np.empty((mask.sum(), k), dtype=object)             # <<<<<<<<<<<<<<
     *
     *     for i in range(n):
     */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_2 = 0;
      __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
        __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_9 < 0)) {
          PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          }
        }
        __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_8 = 0;
      __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

     993:

     994:     for i in range(n):

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

     995:         if mask[i]:

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

     996:             for j in range(k):

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

     997:                 out[pos, j] = values[i, j]

            /* "pandas/lib.pyx":997
     *         if mask[i]:
     *             for j in range(k):
     *                 out[pos, j] = values[i, j]             # <<<<<<<<<<<<<<
     *             pos += 1
     *
     */
            __pyx_t_17 = __pyx_v_i;
            __pyx_t_18 = __pyx_v_j;
            __pyx_t_2 = (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;
          }

     998:             pos += 1

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

     999:

     1000:     return out

      /* "pandas/lib.pyx":1000
     *             pos += 1
     *
     *     return out             # <<<<<<<<<<<<<<
     *
     *
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_out));
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

     1001:

     1002:

     1003: def group_count(ndarray[int64_t] values, Py_ssize_t size):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1003
     *
     *
     * def group_count(ndarray[int64_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(values)
     */
      __pyx_tuple__124 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_size, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_counts); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__124);
      __Pyx_GIVEREF(__pyx_tuple__124);

      /* "pandas/lib.pyx":1003
     *
     *
     * def group_count(ndarray[int64_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(values)
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_85group_count, NULL, __pyx_n_s_pandas_lib); 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_group_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_group_count, 1003, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1004:     cdef:

     1005:         Py_ssize_t i, n = len(values)

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

     1006:         ndarray[int64_t] counts

     1007:

     1008:     counts = np.zeros(size, dtype=np.int64)

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

     1009:     for i in range(n):

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

     1010:         counts[values[i]] += 1

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

     1011:     return counts

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

     1012:

     1013: def lookup_values(ndarray[object] values, dict mapping):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1013
     *     return counts
     *
     * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(values)
     */
      __pyx_tuple__126 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_mapping, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__126);
      __Pyx_GIVEREF(__pyx_tuple__126);

      /* "pandas/lib.pyx":1013
     *     return counts
     *
     * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n = len(values)
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_87lookup_values, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_lookup_values, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_lookup_values, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1014:     cdef:

     1015:         Py_ssize_t i, n = len(values)

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

     1016:

     1017:     result = np.empty(n, dtype='O')

      /* "pandas/lib.pyx":1017
     *         Py_ssize_t i, n = len(values)
     *
     *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
     *     for i in range(n):
     *         result[i] = mapping[values[i]]
     */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_result = __pyx_t_5;
      __pyx_t_5 = 0;

     1018:     for i in range(n):

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

     1019:         result[i] = mapping[values[i]]

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

     1020:     return maybe_convert_objects(result)

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

     1021:

     1022:

     1023: def count_level_1d(ndarray[uint8_t, cast=True] mask,

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      PyArrayObject *__pyx_v_counts = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
      __Pyx_Buffer __pyx_pybuffer_counts;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
      __Pyx_Buffer __pyx_pybuffer_labels;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
      __Pyx_Buffer __pyx_pybuffer_mask;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("count_level_1d", 0);
      __pyx_pybuffer_counts.pybuffer.buf = NULL;
      __pyx_pybuffer_counts.refcount = 0;
      __pyx_pybuffernd_counts.data = NULL;
      __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
      __pyx_pybuffer_mask.pybuffer.buf = NULL;
      __pyx_pybuffer_mask.refcount = 0;
      __pyx_pybuffernd_mask.data = NULL;
      __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
      __pyx_pybuffer_labels.pybuffer.buf = NULL;
      __pyx_pybuffer_labels.refcount = 0;
      __pyx_pybuffernd_labels.data = NULL;
      __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1023
     *
     *
     * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
     *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
     *     cdef:
     */
      __pyx_tuple__128 = PyTuple_Pack(6, __pyx_n_s_mask, __pyx_n_s_labels, __pyx_n_s_max_bin, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_counts); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__128);
      __Pyx_GIVEREF(__pyx_tuple__128);

      /* "pandas/lib.pyx":1023
     *
     *
     * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
     *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
     *     cdef:
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_89count_level_1d, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_count_level_1d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_count_level_1d, 1023, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1024:                    ndarray[int64_t] labels, Py_ssize_t max_bin):

     1025:     cdef:

     1026:         Py_ssize_t i, n

     1027:         ndarray[int64_t] counts

     1028:

     1029:     counts = np.zeros(max_bin, dtype='i8')

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

     1030:

     1031:     n = len(mask)

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

     1032:

     1033:     for i from 0 <= i < n:

      /* "pandas/lib.pyx":1033
     *     n = len(mask)
     *
     *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
     *         if mask[i]:
     *             counts[labels[i]] += 1
     */
      __pyx_t_10 = __pyx_v_n;
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

     1034:         if mask[i]:

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

     1035:             counts[labels[i]] += 1

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

     1036:

     1037:     return counts

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

     1038:

     1039:

     1040: def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_j;
      Py_ssize_t __pyx_v_k;
      Py_ssize_t __pyx_v_n;
      PyArrayObject *__pyx_v_counts = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
      __Pyx_Buffer __pyx_pybuffer_counts;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
      __Pyx_Buffer __pyx_pybuffer_labels;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
      __Pyx_Buffer __pyx_pybuffer_mask;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("count_level_2d", 0);
      __pyx_pybuffer_counts.pybuffer.buf = NULL;
      __pyx_pybuffer_counts.refcount = 0;
      __pyx_pybuffernd_counts.data = NULL;
      __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
      __pyx_pybuffer_mask.pybuffer.buf = NULL;
      __pyx_pybuffer_mask.refcount = 0;
      __pyx_pybuffernd_mask.data = NULL;
      __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
      __pyx_pybuffer_labels.pybuffer.buf = NULL;
      __pyx_pybuffer_labels.refcount = 0;
      __pyx_pybuffernd_labels.data = NULL;
      __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

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

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1040
     *
     *
     * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
     *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
     *     cdef:
     */
      __pyx_tuple__130 = PyTuple_Pack(8, __pyx_n_s_mask, __pyx_n_s_labels, __pyx_n_s_max_bin, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_counts); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__130);
      __Pyx_GIVEREF(__pyx_tuple__130);

      /* "pandas/lib.pyx":1040
     *
     *
     * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
     *                    ndarray[int64_t] labels, Py_ssize_t max_bin):
     *     cdef:
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_91count_level_2d, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_count_level_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_count_level_2d, 1040, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1041:                    ndarray[int64_t] labels, Py_ssize_t max_bin):

     1042:     cdef:

     1043:         Py_ssize_t i, j, k, n

     1044:         ndarray[int64_t, ndim=2] counts

     1045:

     1046:     n, k = (<object> mask).shape

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

     1047:     counts = np.zeros((max_bin, k), dtype='i8')

      /* "pandas/lib.pyx":1047
     *
     *     n, k = (<object> mask).shape
     *     counts = np.zeros((max_bin, k), dtype='i8')             # <<<<<<<<<<<<<<
     *
     *     for i from 0 <= i < n:
     */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __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 = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
        __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_9 < 0)) {
          PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          }
        }
        __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_counts.diminfo[1].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_counts.diminfo[1].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_8 = 0;
      __pyx_v_counts = ((PyArrayObject *)__pyx_t_1);
      __pyx_t_1 = 0;

     1048:

     1049:     for i from 0 <= i < n:

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

     1050:         for j from 0 <= j < k:

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

     1051:             if mask[i, j]:

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

     1052:                 counts[labels[i], j] += 1

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

     1053:

     1054:     return counts

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

     1055:

     1056: cdef class _PandasNull:

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

     1057:

     1058:     def __richcmp__(_PandasNull self, object other, int op):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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
      __Pyx_RefNannySetupContext("__richcmp__", 0);

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

      /* function exit code */
      __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;
    }

     1059:         if op == 2: # ==

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

     1060:             return isinstance(other, _PandasNull)

        /* "pandas/lib.pyx":1060
     *     def __richcmp__(_PandasNull self, object other, int op):
     *         if op == 2: # ==
     *             return isinstance(other, _PandasNull)             # <<<<<<<<<<<<<<
     *         elif op == 3: # !=
     *             return not isinstance(other, _PandasNull)
     */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __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 = 1060; __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;

     1061:         elif op == 3: # !=

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

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

     1062:             return not isinstance(other, _PandasNull)

        /* "pandas/lib.pyx":1062
     *             return isinstance(other, _PandasNull)
     *         elif op == 3: # !=
     *             return not isinstance(other, _PandasNull)             # <<<<<<<<<<<<<<
     *         else:
     *             return False
     */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __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 = 1062; __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:

     1063:         else:

     1064:             return False

        /* "pandas/lib.pyx":1064
     *             return not isinstance(other, _PandasNull)
     *         else:
     *             return False             # <<<<<<<<<<<<<<
     *
     *     def __hash__(self):
     */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
        break;
      }

     1065:

     1066:     def __hash__(self):

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

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

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    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":1066
     *             return False
     *
     *     def __hash__(self):             # <<<<<<<<<<<<<<
     *         return 0
     *
     */

      /* function exit code */
      __pyx_L0:;
      if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1067:         return 0

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

     1068:

     1069: pandas_null = _PandasNull()

      /* "pandas/lib.pyx":1069
     *         return 0
     *
     * pandas_null = _PandasNull()             # <<<<<<<<<<<<<<
     *
     * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):
     */
      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_pandas_null, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     1070:

     1071: def fast_zip_fillna(list ndarrays, fill_value=pandas_null):

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

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

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_92fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_j;
      Py_ssize_t __pyx_v_k;
      Py_ssize_t __pyx_v_n;
      PyArrayObject *__pyx_v_result = 0;
      PyArrayIterObject *__pyx_v_it = 0;
      PyObject *__pyx_v_val = 0;
      PyObject *__pyx_v_tup = 0;
      PyObject *__pyx_v_arr = NULL;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
      __Pyx_Buffer __pyx_pybuffer_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __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":1071
     * pandas_null = _PandasNull()
     *
     * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):             # <<<<<<<<<<<<<<
     *     '''
     *     For zipping multiple ndarrays into an ndarray of tuples
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1071
     * pandas_null = _PandasNull()
     *
     * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):             # <<<<<<<<<<<<<<
     *     '''
     *     For zipping multiple ndarrays into an ndarray of tuples
     */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pandas_null); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_k__10 = __pyx_t_2;
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/lib.pyx":1071
     * pandas_null = _PandasNull()
     *
     * def fast_zip_fillna(list ndarrays, fill_value=pandas_null):             # <<<<<<<<<<<<<<
     *     '''
     *     For zipping multiple ndarrays into an ndarray of tuples
     */
      __pyx_tuple__132 = PyTuple_Pack(11, __pyx_n_s_ndarrays, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_it, __pyx_n_s_val, __pyx_n_s_tup, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__132);
      __Pyx_GIVEREF(__pyx_tuple__132);
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_93fast_zip_fillna, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_zip_fillna, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_fast_zip_fillna, 1071, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1072:     '''

     1073:     For zipping multiple ndarrays into an ndarray of tuples

     1074:     '''

     1075:     cdef:

     1076:         Py_ssize_t i, j, k, n

     1077:         ndarray[object] result

     1078:         flatiter it

     1079:         object val, tup

     1080:

     1081:     k = len(ndarrays)

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

     1082:     n = len(ndarrays[0])

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

     1083:

     1084:     result = np.empty(n, dtype=object)

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

     1085:

     1086:     # initialize tuples on first pass

     1087:     arr = ndarrays[0]

      /* "pandas/lib.pyx":1087
     *
     *     # initialize tuples on first pass
     *     arr = ndarrays[0]             # <<<<<<<<<<<<<<
     *     it = <flatiter> PyArray_IterNew(arr)
     *     for i in range(n):
     */
      if (unlikely(__pyx_v_ndarrays == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_arr = __pyx_t_5;
      __pyx_t_5 = 0;

     1088:     it = <flatiter> PyArray_IterNew(arr)

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

     1089:     for i in range(n):

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

     1090:         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))

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

     1091:         tup = PyTuple_New(k)

        /* "pandas/lib.pyx":1091
     *     for i in range(n):
     *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
     *         tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
     *
     *         if val != val:
     */
        __pyx_t_2 = PyTuple_New(__pyx_v_k); 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);
        __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2);
        __pyx_t_2 = 0;

     1092:

     1093:         if val != val:

        /* "pandas/lib.pyx":1093
     *         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 = 1093; __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 = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_12) {

     1094:             val = fill_value

          /* "pandas/lib.pyx":1094
     *
     *         if val != val:
     *             val = fill_value             # <<<<<<<<<<<<<<
     *
     *         PyTuple_SET_ITEM(tup, 0, val)
     */
          __Pyx_INCREF(__pyx_v_fill_value);
          __Pyx_DECREF_SET(__pyx_v_val, __pyx_v_fill_value);
          goto __pyx_L5;
        }
        __pyx_L5:;

     1095:

     1096:         PyTuple_SET_ITEM(tup, 0, val)

        /* "pandas/lib.pyx":1096
     *             val = fill_value
     *
     *         PyTuple_SET_ITEM(tup, 0, val)             # <<<<<<<<<<<<<<
     *         Py_INCREF(val)
     *         result[i] = tup
     */
        PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val);

     1097:         Py_INCREF(val)

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

     1098:         result[i] = tup

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

     1099:         PyArray_ITER_NEXT(it)

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

     1100:

     1101:     for j in range(1, k):

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

     1102:         arr = ndarrays[j]

        /* "pandas/lib.pyx":1102
     *
     *     for j in range(1, k):
     *         arr = ndarrays[j]             # <<<<<<<<<<<<<<
     *         it = <flatiter> PyArray_IterNew(arr)
     *         if len(arr) != n:
     */
        if (unlikely(__pyx_v_ndarrays == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_2);
        __pyx_t_2 = 0;

     1103:         it = <flatiter> PyArray_IterNew(arr)

        /* "pandas/lib.pyx":1103
     *     for j in range(1, k):
     *         arr = ndarrays[j]
     *         it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
     *         if len(arr) != n:
     *             raise ValueError('all arrays must be same length')
     */
        __pyx_t_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1103; __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_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_5));
        __pyx_t_5 = 0;

     1104:         if len(arr) != n:

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

     1105:             raise ValueError('all arrays must be same length')

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

      /* "pandas/lib.pyx":1105
     *         it = <flatiter> PyArray_IterNew(arr)
     *         if len(arr) != n:
     *             raise ValueError('all arrays must be same length')             # <<<<<<<<<<<<<<
     *
     *         for i in range(n):
     */
      __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_all_arrays_must_be_same_length); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__11);
      __Pyx_GIVEREF(__pyx_tuple__11);

     1106:

     1107:         for i in range(n):

        /* "pandas/lib.pyx":1107
     *             raise ValueError('all arrays must be same length')
     *
     *         for i in range(n):             # <<<<<<<<<<<<<<
     *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
     *             if val != val:
     */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

     1108:             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))

          /* "pandas/lib.pyx":1108
     *
     *         for i in range(n):
     *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))             # <<<<<<<<<<<<<<
     *             if val != val:
     *                 val = fill_value
     */
          if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_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 = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
          __pyx_t_5 = 0;

     1109:             if val != val:

          /* "pandas/lib.pyx":1109
     *         for i in range(n):
     *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
     *             if val != val:             # <<<<<<<<<<<<<<
     *                 val = fill_value
     *
     */
          __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_12) {

     1110:                 val = fill_value

            /* "pandas/lib.pyx":1110
     *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
     *             if val != val:
     *                 val = fill_value             # <<<<<<<<<<<<<<
     *
     *             PyTuple_SET_ITEM(result[i], j, val)
     */
            __Pyx_INCREF(__pyx_v_fill_value);
            __Pyx_DECREF_SET(__pyx_v_val, __pyx_v_fill_value);
            goto __pyx_L11;
          }
          __pyx_L11:;

     1111:

     1112:             PyTuple_SET_ITEM(result[i], j, val)

          /* "pandas/lib.pyx":1112
     *                 val = fill_value
     *
     *             PyTuple_SET_ITEM(result[i], j, val)             # <<<<<<<<<<<<<<
     *             Py_INCREF(val)
     *             PyArray_ITER_NEXT(it)
     */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_5 = (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;

     1113:             Py_INCREF(val)

          /* "pandas/lib.pyx":1113
     *
     *             PyTuple_SET_ITEM(result[i], j, val)
     *             Py_INCREF(val)             # <<<<<<<<<<<<<<
     *             PyArray_ITER_NEXT(it)
     *
     */
          Py_INCREF(__pyx_v_val);

     1114:             PyArray_ITER_NEXT(it)

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

     1115:

     1116:     return result

      /* "pandas/lib.pyx":1116
     *             PyArray_ITER_NEXT(it)
     *
     *     return result             # <<<<<<<<<<<<<<
     *
     * def duplicated(ndarray[object] values, take_last=False):
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_result));
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

     1117:

     1118: def duplicated(ndarray[object] values, take_last=False):

    /* "pandas/lib.pyx":1118
     *     return result
     *
     * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n
     */

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6pandas_3lib_95duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pw_6pandas_3lib_95duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
    static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyArrayObject *__pyx_v_values = 0;
      PyObject *__pyx_v_take_last = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("duplicated (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_take_last,0};
        PyObject* values[2] = {0,0};
        values[1] = ((PyObject *)Py_False);
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_take_last);
              if (value) { values[1] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "duplicated") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_values = ((PyArrayObject *)values[0]);
        __pyx_v_take_last = values[1];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("duplicated", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_L3_error:;
      __Pyx_AddTraceback("pandas.lib.duplicated", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = __pyx_pf_6pandas_3lib_94duplicated(__pyx_self, __pyx_v_values, __pyx_v_take_last);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      PyObject *__pyx_v_seen = 0;
      PyObject *__pyx_v_row = 0;
      PyArrayObject *__pyx_v_result = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
      __Pyx_Buffer __pyx_pybuffer_result;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
      __Pyx_Buffer __pyx_pybuffer_values;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("duplicated", 0);
      __pyx_pybuffer_result.pybuffer.buf = NULL;
      __pyx_pybuffer_result.refcount = 0;
      __pyx_pybuffernd_result.data = NULL;
      __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
      __pyx_pybuffer_values.pybuffer.buf = NULL;
      __pyx_pybuffer_values.refcount = 0;
      __pyx_pybuffernd_values.data = NULL;
      __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

      /* "pandas/lib.pyx":1118
     *     return result
     *
     * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1118
     *     return result
     *
     * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n
     */
      __pyx_tuple__134 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_take_last, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_seen, __pyx_n_s_row, __pyx_n_s_result); if (unlikely(!__pyx_tuple__134)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__134);
      __Pyx_GIVEREF(__pyx_tuple__134);

      /* "pandas/lib.pyx":1118
     *     return result
     *
     * def duplicated(ndarray[object] values, take_last=False):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, n
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_95duplicated, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_duplicated, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_duplicated, 1118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1119:     cdef:

     1120:         Py_ssize_t i, n

     1121:         dict seen = {}

      /* "pandas/lib.pyx":1121
     *     cdef:
     *         Py_ssize_t i, n
     *         dict seen = {}             # <<<<<<<<<<<<<<
     *         object row
     *
     */
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_seen = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     1122:         object row

     1123:

     1124:     n = len(values)

      /* "pandas/lib.pyx":1124
     *         object row
     *
     *     n = len(values)             # <<<<<<<<<<<<<<
     *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)
     *
     */
      __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_n = __pyx_t_2;

     1125:     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)

      /* "pandas/lib.pyx":1125
     *
     *     n = len(values)
     *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
     *
     *     if take_last:
     */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
        }
      }
      __pyx_t_7 = 0;
      __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
      __pyx_t_6 = 0;

     1126:

     1127:     if take_last:

      /* "pandas/lib.pyx":1127
     *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)
     *
     *     if take_last:             # <<<<<<<<<<<<<<
     *         for i from n > i >= 0:
     *             row = values[i]
     */
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_take_last); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

     1128:         for i from n > i >= 0:

        /* "pandas/lib.pyx":1128
     *
     *     if take_last:
     *         for i from n > i >= 0:             # <<<<<<<<<<<<<<
     *             row = values[i]
     *
     */
        for (__pyx_v_i = __pyx_v_n-1; __pyx_v_i >= 0; __pyx_v_i--) {

     1129:             row = values[i]

          /* "pandas/lib.pyx":1129
     *     if take_last:
     *         for i from n > i >= 0:
     *             row = values[i]             # <<<<<<<<<<<<<<
     *
     *             if row in seen:
     */
          __pyx_t_2 = __pyx_v_i;
          __pyx_t_9 = -1;
          if (__pyx_t_2 < 0) {
            __pyx_t_2 += __pyx_pybuffernd_values.diminfo[0].shape;
            if (unlikely(__pyx_t_2 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
          if (unlikely(__pyx_t_9 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_9);
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_6 = (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_SET(__pyx_v_row, __pyx_t_6);
          __pyx_t_6 = 0;

     1130:

     1131:             if row in seen:

          /* "pandas/lib.pyx":1131
     *             row = values[i]
     *
     *             if row in seen:             # <<<<<<<<<<<<<<
     *                 result[i] = 1
     *             else:
     */
          __pyx_t_8 = (__Pyx_PyDict_Contains(__pyx_v_row, __pyx_v_seen, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_10 = (__pyx_t_8 != 0);
          if (__pyx_t_10) {

     1132:                 result[i] = 1

            /* "pandas/lib.pyx":1132
     *
     *             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 = 1132; __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*/ {

     1133:             else:

     1134:                 seen[row] = None

            /* "pandas/lib.pyx":1134
     *                 result[i] = 1
     *             else:
     *                 seen[row] = None             # <<<<<<<<<<<<<<
     *                 result[i] = 0
     *     else:
     */
            if (unlikely(PyDict_SetItem(__pyx_v_seen, __pyx_v_row, Py_None) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1135:                 result[i] = 0

            /* "pandas/lib.pyx":1135
     *             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 = 1135; __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*/ {

     1136:     else:

     1137:         for i from 0 <= i < n:

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

     1138:             row = values[i]

          /* "pandas/lib.pyx":1138
     *     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 = 1138; __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_SET(__pyx_v_row, __pyx_t_6);
          __pyx_t_6 = 0;

     1139:             if row in seen:

          /* "pandas/lib.pyx":1139
     *         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, __pyx_v_seen, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = (__pyx_t_10 != 0);
          if (__pyx_t_8) {

     1140:                 result[i] = 1

            /* "pandas/lib.pyx":1140
     *             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 = 1140; __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*/ {

     1141:             else:

     1142:                 seen[row] = None

            /* "pandas/lib.pyx":1142
     *                 result[i] = 1
     *             else:
     *                 seen[row] = None             # <<<<<<<<<<<<<<
     *                 result[i] = 0
     *
     */
            if (unlikely(PyDict_SetItem(__pyx_v_seen, __pyx_v_row, Py_None) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1143:                 result[i] = 0

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

     1144:

     1145:     return result.view(np.bool_)

      /* "pandas/lib.pyx":1145
     *                 result[i] = 0
     *
     *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
     *
     * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):
     */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

     1146:

     1147: def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):

    /* "pandas/lib.pyx":1147
     *     return result.view(np.bool_)
     *
     * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, group_size, n, lab, start
     */

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6pandas_3lib_97generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pw_6pandas_3lib_97generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
    static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyArrayObject *__pyx_v_labels = 0;
      Py_ssize_t __pyx_v_ngroups;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("generate_slices (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_labels,&__pyx_n_s_ngroups,0};
        PyObject* values[2] = {0,0};
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ngroups)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_slices") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        }
        __pyx_v_labels = ((PyArrayObject *)values[0]);
        __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_L3_error:;
      __Pyx_AddTraceback("pandas.lib.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = __pyx_pf_6pandas_3lib_96generate_slices(__pyx_self, __pyx_v_labels, __pyx_v_ngroups);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_group_size;
      Py_ssize_t __pyx_v_n;
      Py_ssize_t __pyx_v_lab;
      Py_ssize_t __pyx_v_start;
      PyArrayObject *__pyx_v_starts = 0;
      PyObject *__pyx_v_ends = NULL;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
      __Pyx_Buffer __pyx_pybuffer_labels;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_starts;
      __Pyx_Buffer __pyx_pybuffer_starts;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("generate_slices", 0);
      __pyx_pybuffer_starts.pybuffer.buf = NULL;
      __pyx_pybuffer_starts.refcount = 0;
      __pyx_pybuffernd_starts.data = NULL;
      __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts;
      __pyx_pybuffer_labels.pybuffer.buf = NULL;
      __pyx_pybuffer_labels.refcount = 0;
      __pyx_pybuffernd_labels.data = NULL;
      __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

      /* "pandas/lib.pyx":1147
     *     return result.view(np.bool_)
     *
     * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, group_size, n, lab, start
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1147
     *     return result.view(np.bool_)
     *
     * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, group_size, n, lab, start
     */
      __pyx_tuple__136 = PyTuple_Pack(10, __pyx_n_s_labels, __pyx_n_s_ngroups, __pyx_n_s_i, __pyx_n_s_group_size, __pyx_n_s_n, __pyx_n_s_lab, __pyx_n_s_start, __pyx_n_s_slobj, __pyx_n_s_starts, __pyx_n_s_ends); if (unlikely(!__pyx_tuple__136)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__136);
      __Pyx_GIVEREF(__pyx_tuple__136);

      /* "pandas/lib.pyx":1147
     *     return result.view(np.bool_)
     *
     * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
     *     cdef:
     *         Py_ssize_t i, group_size, n, lab, start
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_97generate_slices, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_slices, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_generate_slices, 1147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1148:     cdef:

     1149:         Py_ssize_t i, group_size, n, lab, start

     1150:         object slobj

     1151:         ndarray[int64_t] starts

     1152:

     1153:     n = len(labels)

      /* "pandas/lib.pyx":1153
     *         ndarray[int64_t] starts
     *
     *     n = len(labels)             # <<<<<<<<<<<<<<
     *
     *     starts = np.zeros(ngroups, dtype=np.int64)
     */
      __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_n = __pyx_t_1;

     1154:

     1155:     starts = np.zeros(ngroups, dtype=np.int64)

      /* "pandas/lib.pyx":1155
     *     n = len(labels)
     *
     *     starts = np.zeros(ngroups, dtype=np.int64)             # <<<<<<<<<<<<<<
     *     ends = np.zeros(ngroups, dtype=np.int64)
     *
     */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
        __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_8 < 0)) {
          PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          }
        }
        __pyx_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_7 = 0;
      __pyx_v_starts = ((PyArrayObject *)__pyx_t_6);
      __pyx_t_6 = 0;

     1156:     ends = np.zeros(ngroups, dtype=np.int64)

      /* "pandas/lib.pyx":1156
     *
     *     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 = 1156; __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 = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_ends = __pyx_t_5;
      __pyx_t_5 = 0;

     1157:

     1158:     start = 0

      /* "pandas/lib.pyx":1158
     *     ends = np.zeros(ngroups, dtype=np.int64)
     *
     *     start = 0             # <<<<<<<<<<<<<<
     *     group_size = 0
     *     for i in range(n):
     */
      __pyx_v_start = 0;

     1159:     group_size = 0

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

     1160:     for i in range(n):

      /* "pandas/lib.pyx":1160
     *     start = 0
     *     group_size = 0
     *     for i in range(n):             # <<<<<<<<<<<<<<
     *         group_size += 1
     *         lab = labels[i]
     */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
        __pyx_v_i = __pyx_t_12;

     1161:         group_size += 1

        /* "pandas/lib.pyx":1161
     *     group_size = 0
     *     for i in range(n):
     *         group_size += 1             # <<<<<<<<<<<<<<
     *         lab = labels[i]
     *         if i == n - 1 or lab != labels[i + 1]:
     */
        __pyx_v_group_size = (__pyx_v_group_size + 1);

     1162:         lab = labels[i]

        /* "pandas/lib.pyx":1162
     *     for i in range(n):
     *         group_size += 1
     *         lab = labels[i]             # <<<<<<<<<<<<<<
     *         if i == n - 1 or lab != labels[i + 1]:
     *             starts[lab] = start
     */
        __pyx_t_13 = __pyx_v_i;
        __pyx_t_8 = -1;
        if (__pyx_t_13 < 0) {
          __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides));

     1163:         if i == n - 1 or lab != labels[i + 1]:

        /* "pandas/lib.pyx":1163
     *         group_size += 1
     *         lab = labels[i]
     *         if i == n - 1 or lab != labels[i + 1]:             # <<<<<<<<<<<<<<
     *             starts[lab] = start
     *             ends[lab] = start + group_size
     */
        __pyx_t_14 = ((__pyx_v_i == (__pyx_v_n - 1)) != 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 = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_16 = ((__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides))) != 0);
          __pyx_t_17 = __pyx_t_16;
        } else {
          __pyx_t_17 = __pyx_t_14;
        }
        if (__pyx_t_17) {

     1164:             starts[lab] = start

          /* "pandas/lib.pyx":1164
     *         lab = labels[i]
     *         if i == n - 1 or lab != labels[i + 1]:
     *             starts[lab] = start             # <<<<<<<<<<<<<<
     *             ends[lab] = start + group_size
     *             start += group_size
     */
          __pyx_t_18 = __pyx_v_lab;
          __pyx_t_8 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_starts.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_8 = 0;
          if (unlikely(__pyx_t_8 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_8);
            {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_starts.diminfo[0].strides) = __pyx_v_start;

     1165:             ends[lab] = start + group_size

          /* "pandas/lib.pyx":1165
     *         if i == n - 1 or lab != labels[i + 1]:
     *             starts[lab] = start
     *             ends[lab] = start + group_size             # <<<<<<<<<<<<<<
     *             start += group_size
     *             group_size = 0
     */
          __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_start + __pyx_v_group_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          if (unlikely(__Pyx_SetItemInt(__pyx_v_ends, __pyx_v_lab, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     1166:             start += group_size

          /* "pandas/lib.pyx":1166
     *             starts[lab] = start
     *             ends[lab] = start + group_size
     *             start += group_size             # <<<<<<<<<<<<<<
     *             group_size = 0
     *
     */
          __pyx_v_start = (__pyx_v_start + __pyx_v_group_size);

     1167:             group_size = 0

          /* "pandas/lib.pyx":1167
     *             ends[lab] = start + group_size
     *             start += group_size
     *             group_size = 0             # <<<<<<<<<<<<<<
     *
     *     return starts, ends
     */
          __pyx_v_group_size = 0;
          goto __pyx_L5;
        }
        __pyx_L5:;
      }

     1168:

     1169:     return starts, ends

      /* "pandas/lib.pyx":1169
     *             group_size = 0
     *
     *     return starts, ends             # <<<<<<<<<<<<<<
     *
     *
     */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)__pyx_v_starts));
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_starts));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_starts));
      __Pyx_INCREF(__pyx_v_ends);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ends);
      __Pyx_GIVEREF(__pyx_v_ends);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

     1170:

     1171:

     1172: def indices_fast(object index, ndarray[int64_t] labels, list keys,

    /* "pandas/lib.pyx":1172
     *
     *
     * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
     *                  list sorted_labels):
     *     cdef:
     */

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6pandas_3lib_99indices_fast = {__Pyx_NAMESTR("indices_fast"), (PyCFunction)__pyx_pw_6pandas_3lib_99indices_fast, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
    static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_index = 0;
      PyArrayObject *__pyx_v_labels = 0;
      PyObject *__pyx_v_keys = 0;
      PyObject *__pyx_v_sorted_labels = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("indices_fast (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,&__pyx_n_s_keys,&__pyx_n_s_sorted_labels,0};
        PyObject* values[4] = {0,0,0,0};
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            case  3:
            if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sorted_labels)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "indices_fast") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
          values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        }
        __pyx_v_index = values[0];
        __pyx_v_labels = ((PyArrayObject *)values[1]);
        __pyx_v_keys = ((PyObject*)values[2]);
        __pyx_v_sorted_labels = ((PyObject*)values[3]);
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_L3_error:;
      __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sorted_labels), (&PyList_Type), 1, "sorted_labels", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = __pyx_pf_6pandas_3lib_98indices_fast(__pyx_self, __pyx_v_index, __pyx_v_labels, __pyx_v_keys, __pyx_v_sorted_labels);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_j;
      Py_ssize_t __pyx_v_k;
      Py_ssize_t __pyx_v_lab;
      Py_ssize_t __pyx_v_cur;
      Py_ssize_t __pyx_v_start;
      Py_ssize_t __pyx_v_n;
      PyObject *__pyx_v_result = 0;
      PyObject *__pyx_v_tup = 0;
      PyObject *__pyx_v_val = NULL;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
      __Pyx_Buffer __pyx_pybuffer_labels;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("indices_fast", 0);
      __pyx_pybuffer_labels.pybuffer.buf = NULL;
      __pyx_pybuffer_labels.refcount = 0;
      __pyx_pybuffernd_labels.data = NULL;
      __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

      /* "pandas/lib.pyx":1172
     *
     *
     * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
     *                  list sorted_labels):
     *     cdef:
     */

      /* function exit code */
      __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;
    }

      /* "pandas/lib.pyx":1172
     *
     *
     * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
     *                  list sorted_labels):
     *     cdef:
     */
      __pyx_tuple__138 = PyTuple_Pack(14, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_keys, __pyx_n_s_sorted_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_lab, __pyx_n_s_cur, __pyx_n_s_start, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_tup, __pyx_n_s_val); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_tuple__138);
      __Pyx_GIVEREF(__pyx_tuple__138);

      /* "pandas/lib.pyx":1172
     *
     *
     * def indices_fast(object index, ndarray[int64_t] labels, list keys,             # <<<<<<<<<<<<<<
     *                  list sorted_labels):
     *     cdef:
     */
      __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_99indices_fast, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_indices_fast, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mnt_home_jreback_pandas_pandas, __pyx_n_s_indices_fast, 1172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     1173:                  list sorted_labels):

     1174:     cdef:

     1175:         Py_ssize_t i, j, k, lab, cur, start, n = len(labels)

      /* "pandas/lib.pyx":1175
     *                  list sorted_labels):
     *     cdef:
     *         Py_ssize_t i, j, k, lab, cur, start, n = len(labels)             # <<<<<<<<<<<<<<
     *         dict result = {}
     *         object tup
     */
      __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_n = __pyx_t_1;

     1176:         dict result = {}

      /* "pandas/lib.pyx":1176
     *     cdef:
     *         Py_ssize_t i, j, k, lab, cur, start, n = len(labels)
     *         dict result = {}             # <<<<<<<<<<<<<<
     *         object tup
     *
     */
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     1177:         object tup

     1178:

     1179:     k = len(keys)

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

     1180:

     1181:     if n == 0:

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

     1182:         return result

        /* "pandas/lib.pyx":1182
     *
     *     if n == 0:
     *         return result             # <<<<<<<<<<<<<<
     *
     *     start = 0
     */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_result);
        __pyx_r = __pyx_v_result;
        goto __pyx_L0;
      }

     1183:

     1184:     start = 0

      /* "pandas/lib.pyx":1184
     *         return result
     *
     *     start = 0             # <<<<<<<<<<<<<<
     *     cur = labels[0]
     *     for i in range(1, n):
     */
      __pyx_v_start = 0;

     1185:     cur = labels[0]

      /* "pandas/lib.pyx":1185
     *
     *     start = 0
     *     cur = labels[0]             # <<<<<<<<<<<<<<
     *     for i in range(1, n):
     *         lab = labels[i]
     */
      __pyx_t_4 = 0;
      __pyx_t_5 = -1;
      if (__pyx_t_4 < 0) {
        __pyx_t_4 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_labels.diminfo[0].strides));

     1186:     for i in range(1, n):

      /* "pandas/lib.pyx":1186
     *     start = 0
     *     cur = labels[0]
     *     for i in range(1, n):             # <<<<<<<<<<<<<<
     *         lab = labels[i]
     *
     */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
        __pyx_v_i = __pyx_t_6;

     1187:         lab = labels[i]

        /* "pandas/lib.pyx":1187
     *     cur = labels[0]
     *     for i in range(1, n):
     *         lab = labels[i]             # <<<<<<<<<<<<<<
     *
     *         if lab != cur:
     */
        __pyx_t_7 = __pyx_v_i;
        __pyx_t_5 = -1;
        if (__pyx_t_7 < 0) {
          __pyx_t_7 += __pyx_pybuffernd_labels.diminfo[0].shape;
          if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
        } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0;
        if (unlikely(__pyx_t_5 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_5);
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_labels.diminfo[0].strides));

     1188:

     1189:         if lab != cur:

        /* "pandas/lib.pyx":1189
     *         lab = labels[i]
     *
     *         if lab != cur:             # <<<<<<<<<<<<<<
     *             if lab != -1:
     *                 tup = PyTuple_New(k)
     */
        __pyx_t_3 = ((__pyx_v_lab != __pyx_v_cur) != 0);
        if (__pyx_t_3) {

     1190:             if lab != -1:

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

     1191:                 tup = PyTuple_New(k)

            /* "pandas/lib.pyx":1191
     *         if lab != cur:
     *             if lab != -1:
     *                 tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
     *                 for j in range(k):
     *                     val = util.get_value_at(keys[j],
     */
            __pyx_t_2 = PyTuple_New(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2);
            __pyx_t_2 = 0;

     1192:                 for j in range(k):

            /* "pandas/lib.pyx":1192
     *             if lab != -1:
     *                 tup = PyTuple_New(k)
     *                 for j in range(k):             # <<<<<<<<<<<<<<
     *                     val = util.get_value_at(keys[j],
     *                                             sorted_labels[j][i-1])
     */
            __pyx_t_8 = __pyx_v_k;
            for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
              __pyx_v_j = __pyx_t_9;

     1193:                     val = util.get_value_at(keys[j],

              /* "pandas/lib.pyx":1193
     *                 tup = PyTuple_New(k)
     *                 for j in range(k):
     *                     val = util.get_value_at(keys[j],             # <<<<<<<<<<<<<<
     *                                             sorted_labels[j][i-1])
     *                     PyTuple_SET_ITEM(tup, j, val)
     */
              if (unlikely(__pyx_v_keys == Py_None)) {
                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_keys, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
              __Pyx_GOTREF(__pyx_t_2);
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

              /* "pandas/lib.pyx":1193
     *                 tup = PyTuple_New(k)
     *                 for j in range(k):
     *                     val = util.get_value_at(keys[j],             # <<<<<<<<<<<<<<
     *                                             sorted_labels[j][i-1])
     *                     PyTuple_SET_ITEM(tup, j, val)
     */
              __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_2), __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_10);
              __pyx_t_10 = 0;

     1194:                                             sorted_labels[j][i-1])

              /* "pandas/lib.pyx":1194
     *                 for j in range(k):
     *                     val = util.get_value_at(keys[j],
     *                                             sorted_labels[j][i-1])             # <<<<<<<<<<<<<<
     *                     PyTuple_SET_ITEM(tup, j, val)
     *                     Py_INCREF(val)
     */
              if (unlikely(__pyx_v_sorted_labels == Py_None)) {
                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_sorted_labels, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_11 = (__pyx_v_i - 1);
              __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_10, __pyx_t_11, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

     1195:                     PyTuple_SET_ITEM(tup, j, val)

              /* "pandas/lib.pyx":1195
     *                     val = util.get_value_at(keys[j],
     *                                             sorted_labels[j][i-1])
     *                     PyTuple_SET_ITEM(tup, j, val)             # <<<<<<<<<<<<<<
     *                     Py_INCREF(val)
     *
     */
              PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val);

     1196:                     Py_INCREF(val)

              /* "pandas/lib.pyx":1196
     *                                             sorted_labels[j][i-1])
     *                     PyTuple_SET_ITEM(tup, j, val)
     *                     Py_INCREF(val)             # <<<<<<<<<<<<<<
     *
     *                 result[tup] = index[start:i]
     */
              Py_INCREF(__pyx_v_val);
            }

     1197:

     1198:                 result[tup] = index[start:i]

            /* "pandas/lib.pyx":1198
     *                     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 = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_10);
            if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_tup, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            goto __pyx_L7;
          }
          __pyx_L7:;

     1199:             start = i

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

     1200:         cur = lab

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

     1201:

     1202:     tup = PyTuple_New(k)

      /* "pandas/lib.pyx":1202
     *         cur = lab
     *
     *     tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
     *     for j in range(k):
     *         val = util.get_value_at(keys[j],
     */
      __pyx_t_10 = PyTuple_New(__pyx_v_k); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_10);
      __pyx_t_10 = 0;

     1203:     for j in range(k):

      /* "pandas/lib.pyx":1203
     *
     *     tup = PyTuple_New(k)
     *     for j in range(k):             # <<<<<<<<<<<<<<
     *         val = util.get_value_at(keys[j],
     *                                 sorted_labels[j][n - 1])
     */
      __pyx_t_1 = __pyx_v_k;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
        __pyx_v_j = __pyx_t_6;

     1204:         val = util.get_value_at(keys[j],

        /* "pandas/lib.pyx":1204
     *     tup = PyTuple_New(k)
     *     for j in range(k):
     *         val = util.get_value_at(keys[j],             # <<<<<<<<<<<<<<
     *                                 sorted_labels[j][n - 1])
     *         PyTuple_SET_ITEM(tup, j, val)
     */
        if (unlikely(__pyx_v_keys == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_keys, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_10);
        if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/lib.pyx":1204
     *     tup = PyTuple_New(k)
     *     for j in range(k):
     *         val = util.get_value_at(keys[j],             # <<<<<<<<<<<<<<
     *                                 sorted_labels[j][n - 1])
     *         PyTuple_SET_ITEM(tup, j, val)
     */
        __pyx_t_12 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_10), __pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_12);
        __pyx_t_12 = 0;

     1205:                                 sorted_labels[j][n - 1])

        /* "pandas/lib.pyx":1205
     *     for j in range(k):
     *         val = util.get_value_at(keys[j],
     *                                 sorted_labels[j][n - 1])             # <<<<<<<<<<<<<<
     *         PyTuple_SET_ITEM(tup, j, val)
     *         Py_INCREF(val)
     */
        if (unlikely(__pyx_v_sorted_labels == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_sorted_labels, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = (__pyx_v_n - 1);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

     1206:         PyTuple_SET_ITEM(tup, j, val)

        /* "pandas/lib.pyx":1206
     *         val = util.get_value_at(keys[j],
     *                                 sorted_labels[j][n - 1])
     *         PyTuple_SET_ITEM(tup, j, val)             # <<<<<<<<<<<<<<
     *         Py_INCREF(val)
     *     result[tup] = index[start:]
     */
        PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val);

     1207:         Py_INCREF(val)

        /* "pandas/lib.pyx":1207
     *                                 sorted_labels[j][n - 1])
     *         PyTuple_SET_ITEM(tup, j, val)
     *         Py_INCREF(val)             # <<<<<<<<<<<<<<
     *     result[tup] = index[start:]
     *
     */
        Py_INCREF(__pyx_v_val);
      }

     1208:     result[tup] = index[start:]

      /* "pandas/lib.pyx":1208
     *         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 = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_tup, __pyx_t_12) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

     1209:

     1210:     return result

      /* "pandas/lib.pyx":1210
     *     result[tup] = index[start:]
     *
     *     return result             # <<<<<<<<<<<<<<
     *
     * include "reduce.pyx"
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

     1211:

     1212: include "reduce.pyx"

     1213: include "properties.pyx"

     1214: include "inference.pyx"